Securely Backup & Restore Your Chat
#
Backup your chatWhenever you need to backup your chat messages, you can use the below method to start backup.
The method will backup all the chats and writes to a file. Once backup completed you can get the
backup file path from the onSuccess
callback.
Argument | Type | Description |
---|---|---|
BACKUP_LISTENER | BackupListener | listener to observe the backup events |
- Java
- Kotlin
while the backup is running, if you want to cancel the backup you can use the below method
- Java
- Kotlin
#
Restore from a backup fileWhenever you need to restore the chat messages from the backup file, you can use the below method.
Argument | Type | Description |
---|---|---|
BACKUP_FILE | File | backup file |
RESTORE_LISTENER | RestoreListener | listener to observe the restore events |
- Java
- Kotlin
while the restore backup is running, if you want to cancel the restore operation you can use the below method
- Java
- Kotlin
Note: Depending on the chat messages size the above methods may take long time for completion.
info
Cancelling restore operation will lead to partial db data, so avoid cancelling restore operation in most scenarios.