• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to save my multiple lists of URIs to SharedPreferences?

 
L Vasquez
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to be able to fetch my lists of URIs when the user comes back to the activity or even kills the app. I believe SharedPreferences is the way to go about this but I can't find a good example as to how to actually implement this. Can anybody share some guidance on how to save/fetch these lists? Please be specific (i.e. do I add something to onCreate? or make a method on its own)
 
Norm Radder
Rancher
Posts: 1645
21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found good examples in the Android doc: https://developer.android.com/guide/topics/data/data-storage.html#pref
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!