I am trying to implement the data backup in my application using data backup api.
The onBackup
method in the BackupAgent
helper class is never called. The Document says that the onBackup()
will be called some time in the future. Is there any specific time when the onBackup
will be invoked? Will it be invoked only once a day?
I tried to force the data backup on an emulator and a Nexus 7 device, using the following command:
adb shell bmgr backup <package>
adb shell bmgr run
The onBackup()
implementation was called on the emulator but on the device it was never called. Will the bmgr tool work on the device? Please help me to understand.