Android Question Uninstalling an app on Android 16 does not delete all data

Filippo

Expert
Licensed User
Longtime User
Hi,

I've noticed that after uninstalling an app on Android 16, not all data is deleted, which causes problems. The data is located exclusively in the “DirInternal” directory.
In my case, the database containing the app settings is not deleted, which leads to errors when launching the app.

For example, the variable “IsPrivacyPolicyAllowed” is not initialized because the database returns the value “True” when checking whether the variable exists.
As a result, the entire app launch process does not execute correctly.
Has anyone else encountered similar issues?
 

Filippo

Expert
Licensed User
Longtime User
Assuming that this is the "auto backup" feature then it is not really related to Android 16. It was added several years ago.
This is clearly related to Android 16, because it always worked without any issues on Android 10, 13, and 15.
The “Policy” variable is always initialized to “False” when the app is installed.

Here are two screenshots showing Android 15 and 16:
In Android 15, the settings database is recreated and variables are initialized.
1780904639169.png


In Android 16, the database is copied from the "auto backup" and variables are not initialized.
1780904648993.png



I've now tested it with “SetApplicationAttribute(android:allowBackup, ‘false’)” and it works as it should.
Thank you very much to @Sagenut and @LucaMs for the tip.
 
Upvote 0
Top