Are The Shared Preferences Associated With The App Deleted When The App Is Removed?
Are SharedPreferences value for an App retained even after it is removed? If not, I would like to retain the SharedPreferences even after the app is uninstalled/removed. Is there a
Solution 1:
SharedPreferences are deleted when an app is uninstalled, but you can use the BackupManager to perform a backup into the cloud - Reto Meier has a good blog post for getting you started.
This approach means if a user installs you app onto a new phone they can have their preferences copied over to there as well.
Solution 2:
Yes shared preferences are stored in the data directory for the application. When the app is uninstalled the file is removed.
If you want to retain a shared preferences you'll need to work with a file on the sd card.
Solution 3:
Yes they will get deleted. You would have to store a backup on SD card and restore it upon re-installation.
Post a Comment for "Are The Shared Preferences Associated With The App Deleted When The App Is Removed?"