Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't keep activities - What is it for?

The title is pretty self-explanatory. I understand what this developer option does.

What I don't understand are the following points:

  1. Why was that option introduced, in the first place?
  2. After all the changes that the framework has seen throughout the years, is it still useful?

I am eager to know the reasons behind this option.

like image 309
Sebastiano Avatar asked Mar 14 '14 09:03

Sebastiano


People also ask

What does don't keep activities do?

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.

Does don't keep activities save battery?

Short Version: DON'T USE IT!! Using this option would indeed seem to save battery but infact can end up using even more battery. It may even make your phone kind of a dumb phone, it would make it slow. As its in developer setting its clearly not recommended by Google to be used by a Normal user.

What does enable GPU debug layers do?

Enable GPU debug layers: Available on devices running Android 9 (API level 28) and higher, enable this option to allow loading Vulkan validation layers from local device storage. To learn more, read Vulkan validation layers on Android.


1 Answers

I believe it's a feature used for debugging purpose.

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.

It sounds like it basically helps testing deterministically how your app behaves when the OS shuts it down due to any reason (out of memory and so on).

So, this replied to point 1. Point 2 is: Yes, I guess :)

EDIT: further references

  • On SO How to know "Don't keep activities" is enabled in ICS?
  • an interesting thread about that on androidcentral (reply from MagouyaWare)
like image 82
Nicola Miotto Avatar answered Sep 28 '22 04:09

Nicola Miotto