Search code examples
androidbackupdatabase-backupsandroid-backup-service

Does Android do data backup automatically in the case no backup requests?


I am writing my first Android application that using local Sqlite database. I want to implement database backup onto Google cloud so Android can restore the database whenever end-user re-install the application.

As my understanding. Whenever data changed, developers need to call "BackupManager.dataChanged()" to let request a backup.

My question is: What happen if developers don't call "BackupManager.dataChanged()" when data changed? Does Android will do a backup automatically/regularly EVEN there is no request backup from developers?

Thanks!


Solution

  • I read this and concluded that "to do a backup", dataChanged() must be called :

     "Each time that your application data changes and you want to perform a backup, 
     you must request a backup operation by calling dataChanged()."
    

    The restore process is automatic when the app is re installed.

    "Android automatically performs a restore operation when your application is 
    installed and there exists backup data associated with the user." 
    

    Both these sentences are 'as it is copy pasted' from this link : http://developer.android.com/guide/topics/data/backup.html