# persistant

The `persistent` tag in the Android Manifest is an attribute of the `<application>` element. It specifies whether the application should remain running at all times. The default value is `false`, which means that the application will be killed by the system when it is not in use.

Setting the `persistent` attribute to `true` will cause the application to remain running even when it is not in use. This is useful for system applications that need to be available at all times, such as the clock or the notification manager.

However, it is important to note that setting the `persistent` attribute to `true` can have a negative impact on battery life. This is because the application will continue to run in the background, even when it is not being used.

For most developers, there is no need to use the `persistent` attribute. It is only intended for certain system applications.

Here is an example of how to use the `persistent` attribute in the Android Manifest:

Code snippet

```xml
<application
    android:persistent="true">
    ...
</application>
```

In this example, the `persistent` attribute is set to `true`, which means that the application will remain running at all times.

I hope this helps! Let me know if you have any other questions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.tejpratapsingh.com/_/android-tips/aosp/manifest/persistant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
