开发者

Graceful process shutdown on Android

开发者 https://www.devze.com 2023-02-26 07:08 出处:网络
How can I terminate an app in the Android Emulator so that Activity\'s onDestroy is called? Stopping the process from the Devices window seems to be a process ki开发者_JS百科ll, not a graceful closing

How can I terminate an app in the Android Emulator so that Activity's onDestroy is called? Stopping the process from the Devices window seems to be a process ki开发者_JS百科ll, not a graceful closing like the OS does.


Just pressing the back button in the emulator should finish the activity and call onDestroy. That I suppose is the default behavior if you have not overridden it through onBackPressed.

0

精彩评论

暂无评论...
验证码 换一张
取 消