B
B
BaJIuK2015-09-26 00:40:22
Android
BaJIuK, 2015-09-26 00:40:22

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

1 answer(s)
O
Oleg Gamega, 2015-09-26
@gadfi

you don't need OnPause use onSaveInstanceState/onRestoreInstanceState

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question