I am using Android Studio / java.
I have some custom variables that I need to save when my application is minimized. I have attempted to make a Bundle, that can be saved though onSaveInstanceState(), which seems to work. The issue is retrieving it once the application is active again. From what I understand, I can get it through onRestoreInstanceState() and Oncreate(). The thing is that onRestoreInstanceState() is never called, and OnCreate() isn't called after being reopened from a minimized state.
I want to be able to press the home button (which currently seem to be saving the bundle correctly), and then reopen the application through the 'Recents' button. When I currently do this, the application resets, and I can't get the Bundle I just saved. How do i do this?
Edit: Calling finish() doesn't work. My activity is on top of another activity, so if I do this, I just end up in the previous activity.