I know that this question has been resolved in many other threads for example:
Saving Android Activity state using Save Instance State
I know that the onSaveInstance(Bundle bundle) method is called, but it is always called from the system. I would like to call it when the user presses a button. The only problem as far as I know is that you don’t have the reference to the Bundle that is needed to store your bundle.
Thanks in advance
I know that this question has been resolved in many other threads for example:
Share
Depending on how you need to save your application state, why do you want to use that method and a Bundle? Can you not persist it using SharedPreferences and then load them on resume?