- oldState
- An open, read-only Android.OS.ParcelFileDescriptor pointing to the last backup state provided by the application. May be null, in which case no prior state is being provided and the application should perform a full backup.
- data
- An open, read/write Android.App.Backup.BackupDataOutput pointing to the backup data destination. Typically the application will use backup helper classes to write to this file.
- newState
- An open, read/write Android.OS.ParcelFileDescriptor pointing to an empty file. The application should record the final backup state here after writing the requested data to the data output stream.
Based on oldState, determine what application content needs to be backed up, write it to data, and fill in newState with the complete state as it exists now.
Implementing this method is much like implementing BackupAgent.OnBackup(Android.OS.ParcelFileDescriptor, Android.App.Backup.BackupDataOutput, Android.App.Backup.BackupDataOutput) — the method parameters are the same. When this method is invoked the oldState descriptor points to the beginning of the state data written during this helper's previous backup operation, and the newState descriptor points to the file location at which the helper should write its new state after performing the backup operation.
Note: The helper should not close or seek either the oldState or the newState file descriptors.