This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to store and retrieve array list value in shared preference in android  RSS feed

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
can any body tell how to store and retrieve array list value in shared preference in android give example


Thanks
 
Misha van Tol
Ranch Hand
Posts: 56
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't be done, shared preferences is for storing primitive types only (String, int, boolean etc.).
It depends on the size of, and how the ArrayList is build but if the data can't be easily recreated and must be stored I would suggest storing it in a sqlite database.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!