Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

What is “Don’t Keep Activities” in Android?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Have you ever came across an option under Developer Settings on your mobile phone and wondered what is it all about? If you play around with your phone’s settings, then you will discover an option depicting “Don’t keep activities” hidden under “Developer Options”. For this, you have to be in developer mode first which can be enabled by tapping on the build number seven times. 

Press 7 times on build number

After entering the developer mode you can see the developer options as given below

Don’t keep activities option 

What is “Don’t Keep Activities”?

Basically in layman’s terms Don’t keep activities is a function whose job is to kill every app as soon as the user comes out of it. This means that the Android has to load the app’s resources every time the user opens as it does not have the cached data or memory of that specific app to perform that task. 

From the Titanium doc:

Don’t keep activities under the Developer Options menu. When this option is enabled, the Android OS will destroy an activity as soon as it is stopped. It is intended to help developers debug their apps. For example, it can simulate the case that Android will kill an activity in the background due to memory pressure. In normal use, it is not recommended to turn this option on because this may lead to unexpected issues on the apps, such as freezes, force closes, and reboots.

So why is it present at the First Place and what are its Advantages?

Google has mentioned in its docs that this option was present to help developers to identify the reason(to debug) if there were sudden crashes or reboots or freezing of the app. This is also useful for the developer to check the saved instance state of the app and to check if the app is consuming more memory on the ram than needed. Hence It will be useful for writing the code accordingly.


  • It is not recommended for normal users to enable it as it can have unnecessary consequences
  • It will slow the app drastically as it does not have cache memory(type of memory) to access it when the app loads and has to fetch the resources every time!
  • Some suggest enabling it to increase battery life but it does more bad than good

Hence if you are a developer, don’t hesitate to enable the option, and if you are not then it is not recommended to enable it.

My Personal Notes arrow_drop_up
Last Updated : 23 Apr, 2021
Like Article
Save Article
Similar Reads
Related Tutorials