This simple task has turned into a nightmare for me.
When requesting a backup Im doing adb shell bmgr backup my.package adb shell bmgr run
But I dont receive any messages in the cmd line, however in my logcat I recieve this: 12-22 20:44:46.781: V/BackupServiceBinder(21443): doBackup() invoked 12-22 20:44:46.786: D/BackupHelperDispatcher(21443): handling new helper 'mybackup'
When I reinstall the app I dont get any indication that it has been restored. When I call adb shell bmgr restore my.package
The cmd shows me the following text: restoreStarting: 2 packages restoreFinished: 0 done
Im using the backup in a pro and lite version of an app which both inherit from one library. They all have the backupagent class in manifest, allowbackup is set to true and the backup key meta data tag is also there.
Oh and lastly, my class:
// A key to uniquely identify the set of backup data
static final String PREFS_BACKUP_KEY = "mybackup";
@Override
public void onCreate() {
super.onCreate();
final SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this,
this.getPackageName() + "_preferences");
addHelper(PREFS_BACKUP_KEY, helper);
}
What am I doing wrong? Im trying to backup & restore the default shared prefs.