Alex Rivera | Logout

In android is there any way to preserve SharedPreferences after an uninstall

Asked 2012-03-22T01:44:48.547
31

I am keeping some application meta data in SharedPreferences. Whenever I uninstall the application and reinstall it, the SharedPreferences are deleted.

Is there any way to get that to remain, so that if the user does an uninstall and reinstall, they can recover their old data?

Edit
Report

1 Answer

1

This is actually built-in, you just need to implement a couple of classes to enable it. Data will be backed up and linked to the user's Google account, so it will be automatically restored if they install the app on a new device, re-install, etc.

http://developer.android.com/guide/topics/data/backup.html

answered 2012-03-22T02:30:07.093

Your Answer