Search code examples
androidandroid-sqliteapk

ANDROID When I uninstall my app and I install again the directory folders are different


I am developing app that have a database pre-ready in asset folder and when I install the app the database are sent to databases folder. Everything works when it´s first time I install or when I delete the folders directly, but when I uninstall and install again the app my databases folder that should are empty already have a database.

My app folder when it´s first time:

enter image description here

My app folder when it´s second time:

enter image description here

because of that my app crash, because the database that is inside databases folder is empty.

I need to find a way to solve this problem.


Solution

  • I achieved resolve it by setting these two manifest attributes to "false":

    android:allowBackup="false"
    android:fullBackupContent="false"