Answer the question
In order to leave comments, you need to log in
How to set listener to send application to background?
The bottom line is that when, while my application is running, someone calls or another application wants to go to the foreground. Then my activity is sent to the background and does not save the data I need. I want to hang a listener on such events and save the state in it. What listener to hang up and where?
PS. Now I save the data in onPause, but for some reason it is not called.
Answer the question
In order to leave comments, you need to log in
you don't need OnPause use onSaveInstanceState/onRestoreInstanceState
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question