android - How to restore activity after being stopped? -


the scenario this: have activity starts thread (through asynctask). state correctly saved , restored when changing screen orientation (with onsaveinstancestate , onrestoreinstancestate), thread stopped in onstop(). if "minimize" (or change app) state saved not restored. can do?

-- edit: solved thank guys, had found many similar answers problems kinda more elaborated, thought simple question lead solutions guess i'm stuck 2 options. onrestoreinstancestate , sharedpreferences. thanks!

since rules when state saved , restored depend on situations can't predict, i'd recommend using different approach. using shared preferences easiest. here's link storage options reference page shows how that.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -