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

Since Android 6.0 it has been possible to use:

<application
        android:allowBackup="true">

By setting it to true your data (sharedprefs and others) will be saved on Google cloud and restored next time the app is installed. You can read more about it here. It should be noted that the default settings is true since 6.0.

Leave a Comment