IT. Expert System.

Android Reference

RestoreSession


android.app.backup

Class RestoreSession



  • public class RestoreSession
    extends Object
    Interface for managing a restore session.
    • Method Detail

      • getAvailableRestoreSets

        public int getAvailableRestoreSets(RestoreObserver observer)
        Ask the current transport what the available restore sets are.
        Parameters:
        observer - a RestoreObserver object whose restoreSetsAvailable() method will be called on the application's main thread in order to supply the results of the restore set lookup by the backup transport. This parameter must not be null.
        Returns:
        Zero on success, nonzero on error. The observer's restoreSetsAvailable() method will only be called if this method returned zero.
      • restoreAll

        public int restoreAll(long token,
                     RestoreObserver observer)
        Restore the given set onto the device, replacing the current data of any app contained in the restore set with the data previously backed up.

        Callers must hold the android.permission.BACKUP permission to use this method.

        Parameters:
        token - The token from #getAvailableRestoreSets() corresponding to the restore set that should be used.
        observer - If non-null, this binder points to an object that will receive progress callbacks during the restore operation.
        Returns:
        Zero on success; nonzero on error. The observer will only receive progress callbacks if this method returned zero.
      • restoreSome

        public int restoreSome(long token,
                      RestoreObserver observer,
                      String[] packages)
        Restore select packages from the given set onto the device, replacing the current data of any app contained in the set with the data previously backed up.

        Callers must hold the android.permission.BACKUP permission to use this method.

        Parameters:
        token - The token from getAvailableRestoreSets() corresponding to the restore set that should be used.
        observer - If non-null, this binder points to an object that will receive progress callbacks during the restore operation.
        packages - The set of packages for which to attempt a restore. Regardless of the contents of the actual back-end dataset named by token, only applications mentioned in this list will have their data restored.
        Returns:
        Zero on success, nonzero on error. The observer will only receive progress callbacks if this method returned zero.
      • restorePackage

        public int restorePackage(String packageName,
                         RestoreObserver observer)
        Restore a single application from backup. The data will be restored from the current backup dataset if the given package has stored data there, or from the dataset used during the last full device setup operation if the current backup dataset has no matching data. If no backup data exists for this package in either source, a nonzero value will be returned.
        Parameters:
        packageName - The name of the package whose data to restore. If this is not the name of the caller's own package, then the android.permission.BACKUP permission must be held.
        observer - If non-null, this binder points to an object that will receive progress callbacks during the restore operation.
        Returns:
        Zero on success; nonzero on error. The observer will only receive progress callbacks if this method returned zero.
      • endRestoreSession

        public void endRestoreSession()
        End this restore session. After this method is called, the RestoreSession object is no longer valid.

        Note: The caller must invoke this method to end the restore session, even if restorePackage(String, RestoreObserver) failed.



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2143 / . Delta: 0.05306 с