简体   繁体   中英

Activity life cycle after swiping the app from recent screen

If pressing the back button calls the onDestroy() method, what method is called when the app is swapped from the recent screen.

How to load the activity that is present in the recent screen, after accidentally pressing the back button?

Swapping the app from recent screen kills the process. All activities in backstack of that app are destroyed, calling their respective onPause, onStop and onDestroy methods.

Only the user can choose to select and open your app from the recent screen, you cannot programmatically do that, as that would lead to malicious behaviour.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM