The scenario is like this: I have an activity that starts a thread (through AsyncTask). I get the state correctly saved and restored when changing screen orientation (with onSaveInstanceState and onRestoreInstanceState), the thread is stopped in onStop(). But if I "minimize" (or change app) I get my state saved but NOT restored. What can I do?
-- Edit: Solved Thank you guys, I had found many similar answers but the problems were kinda more elaborated, I thought that a simple question could lead to another solutions but I guess I'm stuck with those two options. onRestoreInstanceState and SharedPreferences. Thanks!