There is a strange function in some Android devices (at least Galaxy S7): they restore data (for example the SQLite database) when the application is reinstalled. This behavior interrupts my app because the data is supposed to be deleted during uninstallation.
How can I force Android to completely delete all that data when the app is manually uninstalled?
You have to disable the backup from AndroidManifest.xml
android:allowBackup="false"
tools:replace="android:allowBackup"
N.B: If you use any third party library that use android:allowBackup="true" then it conflicts and give error. To resolve this and override the setting you also have to add tools:replace="android:allowBackup".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With