0

My app lets users browse through slideshows of images. Every slideshow is a collection of all the images in a certain folder. Usually a folder has about 50-60 images. I want to save the image position in the slideshow the user is at when he/she exits that folder's slideshow. What would be the most optimal way for this?

  • I think this post should provide a good minimal working example: http://stackoverflow.com/questions/151777/saving-activity-state-in-android – D4ngle Jun 10 '14 at 19:21

2 Answers2

0

You can save this persistently (across application launches by using a shared preferences).

Andre Perkins
  • 7,640
  • 6
  • 25
  • 39
0

You can use Gson to convert your class (which has your save data) into a json string and can use SharedPreferances to serialize the string into a file. When you want to laod your progress, you can read the SharedPreference value and load your class using Gson.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184