I'm trying to implement this : Back up user data with Auto Backup
My app generates a UUID during the first install to uniquley identify the device. However, if the user does a full reainstall then a new UUID will be created.
In my app, on first install a UUID is saved and the backed up to a KVS in the preferences. My understanding this is held in an xml file (i;ve called mine AppPrefs and I want that backedup perminently so on reinstall this infromation is recovered and the same UUID used.
I do understand the user can turn this off.
At the moment I've added this to the manifest :
and I'm trying to add the following backup_rules.xml :
I've tried adding this to the res/xml folder but it keep getting deleted on each build
Am I on the right track or is there a better way to do this?
My app generates a UUID during the first install to uniquley identify the device. However, if the user does a full reainstall then a new UUID will be created.
In my app, on first install a UUID is saved and the backed up to a KVS in the preferences. My understanding this is held in an xml file (i;ve called mine AppPrefs and I want that backedup perminently so on reinstall this infromation is recovered and the same UUID used.
I do understand the user can turn this off.
At the moment I've added this to the manifest :
B4X:
SetApplicationAttribute(android:allowBackup, "true")
SetApplicationAttribute(android:fullBackupContent, "@xml/backup_rules")
and I'm trying to add the following backup_rules.xml :
B4X:
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<include domain="sharedpref" path="AppPrefs.xml"/>
</full-backup-content>
I've tried adding this to the res/xml folder but it keep getting deleted on each build
Am I on the right track or is there a better way to do this?
Last edited: