As stated in the Dev Guide, actions can be restored after "the application process is killed" and "The user goes to Activity." First of all, I have never seen this happen. It seems that I cannot "go back" to the Activity, when its process is killed, the Activity simply left the stack after the process disappeared.
If this happens, how will this happen?
And I saw a strange but good thing: There is one Activity A1
that launches Activity A2
another application. Now A2
is the main task. When memory gets low, at least on emulators (where I can easily eat RAM), A2
will be killed instead of A1
.
I'm afraid, for example, something like this: My application has two activities on the stack, and we call them A0
and A1
. And A1
again launched Activity A2
another application. When A0
was about to start A1
, it gives A1
reference to the data object D
Now, if the process for A0
and A1
killed and A2 is in the foreground, D
is also lost. When A2 finishes, it seems that you need to restore at least A1
. And so A1
will have to handle recovery D
And what else will A1 have to find a way to tell the still dead A0
link to the restored D
Is it difficult or was I wrong?
source share