How does BackupAgent work?

I look at AndroidManifest files, and I see entries for android:backupAgentand according to the documentation android:backupAgentthere

The name of the class that implements BackupAgent for managing backup and restore of application settings to external storage.

But I can not find the interface BackupAgentor any other documentation. Can someone point me in the right direction?

+3
source share
2 answers

The BackupAgent API has not yet hardened, so this is a hidden class. You can check it out on Android git where there is this comment:

/**
 * This is the central interface between an application and Android's
 * settings backup mechanism.
 * 
 * @hide pending API solidification
 */
+2
source

, , android.app.BackupAgent android.backup.BackupManager.

BackupAgent , javadoc " Android". onBackup() onRestore().

BackupManager. javadoc : "BackupManager - . , ". dataChanged() beginRestoreSession() .

BackupManager :

*
* @hide pending API solidification
*/

/** @hide TODO: REMOVE THIS */
public static final boolean EVEN_THINK_ABOUT_DOING_RESTORE = true;

, , , - EVEN_THINK_ABOUT_DOING_RESTORE - . , Android.

+2

Source: https://habr.com/ru/post/1727793/


All Articles