3

I have seen two developer option

1. Don't Keep activities 
2. No Background Process

I understand the use of these two options.

Only thing I am bit confused is , If any other process need memory, will the android system do any of these

1. kill only activities.
2. kill the entire application process.

I have only seen application process gets killed. I have not seen a real time scenario where application process is not killed and only activity is killed.

If so why do we need this as "Developer option". Is there any particular scenario based on which android system decides to kill activity or kill the entire application process ?

Note: I understand both options, please don't give input for understanding the options. Any idea on when "Don't keep activities " scenario might happen ll be highly appreciated.

Sowmia Sundararajan
  • 1,613
  • 2
  • 14
  • 17
  • 1
    http://stackoverflow.com/questions/14375720/android-destroying-activities-killing-processes – karan Jul 29 '15 at 07:18
  • 1
    Just an advice: There are some people who use those options to "improve the speed" of their phones. So your app at least should not totally crash if one of those options is active. – daemmie Jul 29 '15 at 07:19

1 Answers1

2

When a user uses an application like "Clean Master" to free up their RAM. This cleaner clears out memory used by the app but process itself is still running. When the user comes back to the application the onCreate() for the activity he was last in is called.

Shakti
  • 1,581
  • 2
  • 20
  • 33
  • another normal scenario , when we press back button, the activity is killed but the process is not killed. When we start the app from recent apps, the same scenario occurs. – Sowmia Sundararajan Aug 13 '15 at 07:08