As I observed it seems that the fragment backstack is not retained after process death.
So if I kill my app by putting it to background and call am kill <app>
it does not recreate the fragment backstack if i take the app to foreground again.
This seems to be the case with both - using Jetpack Navigation Components
and using supportfragmantmanager
with addToBackStack
After Orientation change everything works as expected. So I don't know whether the backstack is always cleared after process death and cannot be retained or if there have to be some extra steps done to retain the backstack.
am kill
and "process death" (i.e., due to memory, etc.) are very, very different things. What makes you think they are related? – Inchwormam kill
, whereas it does not survive other common "kill" things that a developer might try (swiping the task off the overview screen, red "stop" buttons in Studio). If there is a better way for a developer to simulate the OOM killer terminating the app's process, I'd love to hear about it! I assume that the Jetpack implementation of fragment stores the backstack details in saved instance state. – Beaker