CreateRestoreCredentialRequest
class CreateRestoreCredentialRequest : CreateCredentialRequest
| kotlin.Any | ||
| ↳ | androidx.credentials.CreateCredentialRequest | |
| ↳ | androidx.credentials.CreateRestoreCredentialRequest |
A request to create a restore credential used for app restore purpose. App restore feature is a feature that allows users to copy an app and its data to a new Android device.
If the isCloudBackupEnabled is true, the restore credential service will periodically backup the restore credential to cloud. In order to use this setting, the user device must enable backup and have end-to-end-encryption enabled, such as screen lock. More about cloud backup can be found here. Cloud backup is supported on Android 2.2 and above. If the cloud backup is not enabled, catch the E2eeUnavailableException and retry without cloud backup.
| Throws | |
|---|---|
androidx.credentials.exceptions.restorecredential.E2eeUnavailableException |
if |
androidx.credentials.exceptions.restorecredential.CreateRestoreCredentialDomException |
if the requestJson is an invalid Json that does not follow the standard webauthn web json format |
kotlin.IllegalArgumentException |
If |
Summary
Public constructors |
|---|
CreateRestoreCredentialRequest( |
Public properties |
|
|---|---|
Boolean |
whether the credential should be backed up to cloud. |
String |
the request in JSON format in the standard webauthn web json. |
Inherited properties |
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
CreateRestoreCredentialRequest
CreateRestoreCredentialRequest(
requestJson: String,
isCloudBackupEnabled: Boolean = true
)
| Parameters | |
|---|---|
requestJson: String |
the request in JSON format in the standard webauthn web json. |
isCloudBackupEnabled: Boolean = true |
whether the credential should be backed up to cloud. |
Public properties
isCloudBackupEnabled
val isCloudBackupEnabled: Boolean
whether the credential should be backed up to cloud.
requestJson
val requestJson: String
the request in JSON format in the standard webauthn web json.