I just want to ask a small question. How long my application will be stored in background before Android kill it automatically. And, will be onDestroy() event fired when it happens?
Thank you!
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.
As explained in the Activity Lifecycle onDestroy() is called when “The activity is finishing or being destroyed by the system” That means that you either manually call finish() in your code, or the phone’s system needs the resources occupied by your app. When this happens(for example when another app needs those resources) the OS will call onDestroy() on your app.