Search code examples
androidactivity-lifecycleapplication-lifecycle

what exactly android's home button doing?


What I do know is that the current activity get into the onPause() mode, and the home screen activity brought to front.

My confusion starts with situation you can re-open the application from the recent tasks menu. so what exactly happening when I'm opening the application from the recent tasks manager?

Is the activity that was foreground when the home button pressed is still somewhere in the stack?

Is there more then one activity stack on the same time?


Solution

  • As far as I understand it, there is no real stack (of applications). Is just that your activity has states, so whenever you are pressing the HOME button your activity in your current application just "pauses" like if it was a stand-by state so multiple applications can be in this state as long as the system doesnt require memory and kill the tasks. So whenever you open the activity from the recent tasks its just telling the application to wake up.