android - Recreate an activity in another activity? -


so have 2 activites can switch between. let's call them activitya , activityb. if i'm in activityb , somehow crashes , start app again should appear activityb , not a.

i thought of sharedpreferences(i used switching) , savedinstancestate, can last 1 handle savedinstancestate of other activites or own? can somehow tell activitya if there instance of activityb , if ro start immediately?

when app starts, android runs whichever activity told (as defined in manifest) - can work advantage. should able create splash activity determines last activity (via tracking, sharedprefs or perhaps savedinstancestate - haven't mucked latter much), , launch appropriate activity before finish();-ing splash activity.

make sure splash looks decent though - add in handler keep @ least 1500-2000ms.


Comments