What exactly happens when I press home button in Android?
Because when I open it again after home button pressed, it has series of bugs.
I need to know it to track down the point that causes that bugs.
UPDATE:
when pressing home button, application goes to background and onPause() is called and saves the state of UI, however it does not save state of application, like variables, custom views. And you have to save them manually, as Oren explained.
Technichally? Anything can happen, from just
onPausebeing called, to the device killing the app to free up memory, to the user shutting down and restarting the device. Your app should handle all of these possibilities.Further reading : android activity lifecycle