Reputation: 777
I have a game that uses a shared preference to record the users high score and display this on a statistics page.
My question -> Will this shared preference persist even after the user exits the application? How do I ensure that this data is always retained, will shared preferences do this or do I need to use something else?
Upvotes: 1
Views: 106
Reputation: 22291
Please see below link for complete infomation of shared preferences, it will solve your problem.
Upvotes: 0
Reputation: 32016
Yes, shared preferences are stored until the app is uninstalled or the user clears app data.
See storage options for details on different methods of persisting data.
Upvotes: 0
Reputation: 6578
Will this shared preference persist even after the user exits the application?
yes!
How do I ensure that this data is always retained, will shared preferences do this or do I need to use something else?
Upvotes: 2