Question: I made a small mobile app using flutter. When using it, it saves data locally into the Sqlite database.
When I uninstall it , the database seems to get deleted as well, so next time I install the app again, the data is gone.
Any ideas how to leave the database file in the phone even the app is deleted?
Thank you.

Answer: 
This issue exists if your device is Android 6 (API level 23) and above, where android supports automatic backup, which means data will be stored in the device even if you uninstall the application.

**For Android:**

To get rid of this, go to the AndroidManifest file and add

```
<application 
     android:allowBackup="false"
     android:fullBackupOnly="false"
     //...
   />

```

**For iOS:**
refer <https://stackoverflow.com/a/57937650/5106574>
I think the best way to take backup, save db as a txt file, and set your file in somewhere disk device . 
[Reading\_Writing\_file](https://flutter.dev/docs/cookbook/persistence/reading-writing-files)

OR create new db as a backup db 
[Example](https://stackoverflow.com/questions/13502223/backup-restore-sqlite-db-in-android)