Added in API level 8

RestoreObserver

abstract class RestoreObserver
kotlin.Any
   ↳ android.app.backup.RestoreObserver

Callback class for receiving progress reports during a restore operation. These methods will all be called on your application's main thread.

Summary

Public constructors

Public methods
open Unit
onUpdate(nowBeingRestored: Int, currentPackage: String!)

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

open Unit

The restore process has completed.

open Unit
restoreStarting(numPackages: Int)

The restore operation has begun.

Public constructors

RestoreObserver

RestoreObserver()

Public methods

onUpdate

Added in API level 8
open fun onUpdate(
    nowBeingRestored: Int,
    currentPackage: String!
): Unit

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.

Parameters
nowBeingRestored Int: 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.

restoreFinished

Added in API level 8
open fun restoreFinished(error: Int): Unit

The restore process has completed. This method will always be called, even if no individual package restore operations were attempted.

Parameters
error Int: Zero on success; a nonzero error code if the restore operation as a whole failed.

restoreStarting

Added in API level 8
open fun restoreStarting(numPackages: Int): Unit

The restore operation has begun.

Parameters
numPackages Int: The total number of packages being processed in this restore operation.