0

I've been working on an app lately and didnt figure out how to save the state of my application after closing ,i found something about SharedPreferences but i saw that it saves a (key,value) ,it can help if i want to store the username and the password but how to store the whole state of the app ?

Thanks.

Frank
  • 71
  • 2
  • 10

1 Answers1

1

Please see here. It has exactly what you need. Just override onSaveInstanceState and save whatever custom values you may have to the bundle, and retrieve it by overriding onRestoreInstanceState.

Community
  • 1
  • 1
Kyle
  • 598
  • 1
  • 7
  • 25