Android Question KVS.remove and data persistence

Aegis

Member
Hello
Im using KeyValueStore (the new and recommended one) to store and load bytearrays ( representing device configuration backups)
Everything works fine, until i uninstall the app. Upon reinstallation, all the removed keys ( removed by KVS.remove ) come back, with their name and value intact.

KVS is initialized in Activity_Create in xui.DefaultFolder , which should be DirInternal if i'm not mistaken.

The database being still there after uninstall i can understand, by why it still has all the deleted keys?

Thanks
 

Aegis

Member
What happens if you opt out of Android backup feature?

B4X:
SetApplicationAttribute(android:allowBackup, "false")
I have to test some more, but seems to have worked, the deleted keys no longer come back👍

Is there a way to keep the auto backup, and maybe "force" a syncronization after an entry is deleted/added to KVS?
 
Upvote 0
Top