Share via


BackupAgentHelper.OnRestore Method

Definition

Run the restore process on each of the configured handlers.

[Android.Runtime.Register("onRestore", "(Landroid/app/backup/BackupDataInput;ILandroid/os/ParcelFileDescriptor;)V", "GetOnRestore_Landroid_app_backup_BackupDataInput_ILandroid_os_ParcelFileDescriptor_Handler")]
public override void OnRestore (Android.App.Backup.BackupDataInput? data, int appVersionCode, Android.OS.ParcelFileDescriptor? newState);
[<Android.Runtime.Register("onRestore", "(Landroid/app/backup/BackupDataInput;ILandroid/os/ParcelFileDescriptor;)V", "GetOnRestore_Landroid_app_backup_BackupDataInput_ILandroid_os_ParcelFileDescriptor_Handler")>]
override this.OnRestore : Android.App.Backup.BackupDataInput * int * Android.OS.ParcelFileDescriptor -> unit

Parameters

data
BackupDataInput

A structured wrapper around an open, read-only file descriptor pointing to a full snapshot of the application's data. The application should consume every entity represented in this data stream.

appVersionCode
Int32

The value of the android:versionCode manifest attribute, from the application that backed up this particular data set. This makes it possible for an application's agent to distinguish among any possible older data versions when asked to perform the restore operation.

newState
ParcelFileDescriptor

An open, read/write ParcelFileDescriptor pointing to an empty file. The application should record the final backup state here after restoring its data from the data stream. When a full-backup dataset is being restored, this will be null.

Attributes

Exceptions

Remarks

Run the restore process on each of the configured handlers.

Java documentation for android.app.backup.BackupAgentHelper.onRestore(android.app.backup.BackupDataInput, int, android.os.ParcelFileDescriptor).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to