Class MAMFileBackupHelper

  • All Implemented Interfaces:
    android.app.backup.BackupHelper , com.microsoft.intune.mam.client.app.backup.HookedBackupHelper , com.microsoft.intune.mam.client.app.backup.HookedFileBackupHelper

    
    public final class MAMFileBackupHelper
    extends FileBackupHelper implements HookedFileBackupHelper
                        

    MAM version FileBackupHelper.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      MAMFileBackupHelper(Context context, Array<String> fileNames) Creates a MAMFileBackupHelper to assist in backing up files.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Context getContext() Get the context this helper was created with.
      Array<String> getFileNames() Get the file names associated with this backup helper.
      boolean isValid() Determines whether this backup helper is in a good state and should be backed up.
      void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
      File getRootDirectory() Returns the directory where the files that this helper backs up exist.
      • Methods inherited from class android.app.backup.FileBackupHelper

        restoreEntity, writeNewStateDescription
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MAMFileBackupHelper

        MAMFileBackupHelper(Context context, Array<String> fileNames)

        Creates a MAMFileBackupHelper to assist in backing up files.

        Parameters:
        context - the app's context.
        fileNames - the names of the files to back up.
    • Method Detail

      • getContext

         Context getContext()

        Get the context this helper was created with.

        Returns:

        the context.

      • getFileNames

         Array<String> getFileNames()

        Get the file names associated with this backup helper.

        Returns:

        the file names.

      • isValid

         boolean isValid()

        Determines whether this backup helper is in a good state and should be backed up.

        Returns:

        true if it is in a good state, false otherwise.

      • performBackup

         void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
      • getRootDirectory

         File getRootDirectory()

        Returns the directory where the files that this helper backs up exist.

        Returns:

        the directory where the files that this helper backs up exist.