When my android app goes to background, it may be closed by system to reclaim resources. Can I detect this moment and run some code? Is there any notification (method called) when it happens?
Share
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.
The correct answer is “NO”. When Android wants to shut down your application to reclaim resources it just kills your process. That’s it. No warning, no callback, no chance to do anything at all.