Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the main advantage and disadvantage of "do not keep activities" in android

Tags:

One query I would like to have if anyone could answer it like: Do not keep activities options to be checked during testing android mobile application from developers options.

I used it in my application and found that my application behaves inappropriately and crashed when I switched ON Do not keep activities in android.

My questions were few :

1: How much this option will affect mobile applications?

2: What exactly does this do?

It sounds like an app killer,I notice in the Developer Options there is a box that says Do not keep activities - destroy every activity as soon as the user leaves it .

Does this create any positive and or negative functionality on my apps?

Does that mean if I open an app and as soon as I leave it, it actually closes that app and I wouldn't see it in the task manager to manually kill it? If so, isn't this a good thing to keep the RAM usage low?

What were the advantages and disadvantages of using it while keeping Do not keep activities ,Kindly share the experience on it.

like image 227
BlueBerry - Vignesh4303 Avatar asked Jan 20 '14 06:01

BlueBerry - Vignesh4303


People also ask

Should I enable dont keep activities?

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.

What are the two types of activity in Android development?

Here is the list of activities: No Activity. Basic Activity. Bottom Navigation Activity.


1 Answers

How much this option will affect mobile applications?

If they are well writen this option will not affect them.

What exactly does this do?

If you have this option turned on only variables kept in activity with method onSaveInstanceState will be saved when you go to another activity or app goes in background. All other variables will be removed immediately. When this option is off there is possibility that these variable will be kept

Does that mean if I open an app and as soon as I leave it, it actually closes that app and I wouldn't see it in the task manager to manually kill it?

No it means that all not kept variables will be removed. When you in example press home button.

Does this create any positive and or negative functionality on my apps?

No it only helps to develop application properly. It helps to predict unexpected situations.

like image 70
Adam Radomski Avatar answered Oct 21 '22 07:10

Adam Radomski