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

Support requests about VPN Client Pro
Post Reply
admin
Site Admin
Posts: 728
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

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

Post 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
Post Reply