Partager via


RestoreObserver.OnUpdate(Int32, String) Method

Definition

An indication of which package is being restored currently, out of the total number provided in the #restoreStarting(int) callback.

[Android.Runtime.Register("onUpdate", "(ILjava/lang/String;)V", "GetOnUpdate_ILjava_lang_String_Handler")]
public virtual void OnUpdate (int nowBeingRestored, string? currentPackage);
[<Android.Runtime.Register("onUpdate", "(ILjava/lang/String;)V", "GetOnUpdate_ILjava_lang_String_Handler")>]
abstract member OnUpdate : int * string -> unit
override this.OnUpdate : int * string -> unit

Parameters

nowBeingRestored
Int32

The index, between 1 and the numPackages parameter to the #restoreStarting(int) callback, of the package now being restored. This may be non-monotonic; it is intended purely as a rough indication of the backup manager's progress through the overall restore process.

currentPackage
String

The name of the package now being restored.

Attributes

Remarks

An indication of which package is being restored currently, out of the total number provided in the #restoreStarting(int) callback. This method is not guaranteed to be called: if the transport is unable to obtain data for one or more of the requested packages, no onUpdate() call will occur for those packages.

Java documentation for android.app.backup.RestoreObserver.onUpdate(int, java.lang.String).

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