Page 1 of 1

How to request a backup restore from a third-party app

Posted: Sun Jul 14, 2024 8:13 pm
by admin
To restore a backup you can use an Intent with the action set to "it.colucciweb.vpnclientpro.RESTORE_BACKUP",
the backup file passed as the data URI and the password as "it.colucciweb.vpnclientpro.RESTORE_PASSWORD" extra string.
The Intent must be sent using the registerForActivityResult or startActivityForResult API.
If the backup is restored correctly the "resultCode" will be set to "RESULT_OK" otherwise it will be set to "RESULT_CANCELED".
If the app does not contain any VPN profile (it has just been installed) it is possible to restore the backup silently
without any user intervention, otherwise a message will be shown to the user who can then decide whether to proceed with the backup restore.

Here you can download a sample app:
BackupRestoreExample.zip