简体   繁体   中英

Will mobile application state be intact if an app goes into background

For Android/ARM and iOS 4 if the mobile application goes into background (eg if another app gets focus), will the state of the application be intact, when the it becomes active again?

Could it happend that an application automatically shuts down, if idle for some period of time?

In Android, the OS may kill the application if it needs to regain some memory. This means the onStop() method of your activities will be called.

See Android Developer - activity lifecycle for more details.

In iOS There two method is there...
1.applicationDidEnterBackground
2.applicationWillEnterForeground

so use this method for your purpose.

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