我正在尝试重现用户报告的错误,并且我正在尝试强制执行以下方案(取自Android Developer中的“活动”页面):
然后,如果系统杀死您的申请流程和用户 导航回您的活动,系统重新创建活动和 将Bundle传递给onCreate()和onRestoreInstanceState()。
我已尝试在模拟器和设备上,强制关闭并尝试强制操作系统终止(通过加载和使用其他应用程序),但没有成功。发生上述情况的指示是活动是否传递非零捆绑(并且不是由于配置更改)。
答案 0 :(得分:0)
找到答案here
答案基本上是:
For example, run your app so it has some activities, press
home, use adb shell's "ps" to find your process and "kill" to kill it, then
select it again from home. You process will be restarted, with the top-most
activity started. None of the others will be running at this point.