I am starting Android Programming!
Can anyone give me a simple explanation about Android’s onResume onPause event?
When does it occur and when does the activity get destroyed and free memory? Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your application will be destroyed upon the onDestroy() method; this is generally called the last activity in your application has left the stack.
onPause() and onResume() I believe are called when another activity is placed on top of the current activity in the stack – onPause() would be called once said activity loses focus, and onResume() would be called once it gains focus again.
The below image should explain things better. Good luck!