Google provides data backup service (https://developer.android.com/guide/topics/data/backup.html), which I'm trying to take advantage of.
I followed the instructions, but I can't seem to get it working. I've done the following:
- Registered for the backup service and got the key
-
Updated the manifest.xml
<application android:backupAgent="app.namespace.MyBackupAgentHelper"
android:restoreAnyVersion="true">
<!-- backup service registration -->
<meta-data android:name="com.google.android.backup.api_key"
android:value="xxxxxxxxxxxxxxxxxxxxxx" />
Extended BackupAgentHelper
namespace App.Namespace
{
public class MyBackupAgentHelper : BackupAgentHelper
{
public override void OnCreate()
{
base.OnCreate();
var fbh = new FileBackupHelper(this, this.GetDatabasePath(Const.Database.Name).AbsolutePath);
this.AddHelper("DATABASE", fbh);
}
}
}
-
In my database helper I initialise BackupManager
and upon data change call this.backupManager.DataChanged();
And it doesn't seem to work as expected - when I uninstall and reinstall the app the database I expect to be backup isn't getting restored.
I have also tried instigating backup manually (as per instructionshttps://developer.android.com/guide/topics/data/backup.html#Testing) to no avail.
Any help is appreciated. Thanks
_______________________________________________
Monodroid mailing list
[hidden email]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid