我有一堆 Activity ,基本上是初始用户设置。所以用户通过第一个屏幕,第二个,第三个,输入他的所有信息,然后假设第 6 个 Activity 是主应用程序。但是假设主应用程序崩溃了。当我重新启动该应用程序时,它从第 4 个 Activity(登录屏幕之一)开始。发生崩溃后,Android 如何存储启动位置?我该如何更改?
最佳答案
所以这是基本的:
In android, every activity is stored in a stack like structure. Last in first out.
Now if your app crashes in 6th activity , android will look for the last activity in the stack.
要更改此设置,您必须添加适当的标志以及用于调用的 Intent 你的 Activity 。
编辑:
也可以通过 code. 查看关于 Intent 的精彩教程
关于android - Android 如何知道去哪里取货?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17432278/