Question: 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?

Answer: 
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](http://developer.android.com/training/backup/autosyncapi.html). It should be noted that the **default** settings is **true** since 6.0.
As edthethird said: best lay physical files on device external storage and read them on installation.
If the file content needs to be hidden from users just perform a simple encryption/decryption process.