I am creating an Android app and the database is being persisted after uninstalls. When I uninstall the app, the application dir is destroyed (/data/user/0/<name>), which is good. But when I install the app again, the database is restored with the old data.
With the application uninstalled, I'll hit the debug button on Android Studio which installs the APK. I put a breakpoint on the very first line of my application class (the one that extends Application), and while that breakpoint is hit, I navigated to the /data/user/0/<app name>/databases folder and did an ls and the DB is there. It never even hit my database class yet to init it. I'm stumped and can't figure out why it's doing this.
Here's how I've tried to debug it thus far:
Have you tried adding this to your android manifest?
<application android:allowBackup="false" tools:replace="android:allowBackup">
remember it should be inside the application tag.