ProviderCreateCredentialRequest


class ProviderCreateCredentialRequest


Final request received by the provider after the user has selected a given CreateEntry on the UI.

This request contains the actual request coming from the calling app, and the application information associated with the calling app.

Throws
kotlin.NullPointerException

If callingRequest, or callingAppInfo is null

Note : Credential providers are not expected to utilize the constructor in this class for any production flow. This constructor must only be used for testing purposes.

Summary

Public companion functions

Bundle

Helper method to convert the given request to a parcelable Bundle, in case the instance needs to be sent across a process.

ProviderCreateCredentialRequest
@RequiresApi(value = 23)
fromBundle(bundle: Bundle)

Helper method to convert a Bundle retrieved through asBundle, back to an instance of ProviderCreateCredentialRequest.

Public constructors

ProviderCreateCredentialRequest(
    callingRequest: CreateCredentialRequest,
    callingAppInfo: CallingAppInfo,
    biometricPromptResult: BiometricPromptResult?
)

constructs an instance of ProviderCreateCredentialRequest

Public properties

BiometricPromptResult?

the result of a Biometric Prompt authentication flow, that is propagated to the provider if the provider requested for androidx.credentials.CredentialManager to handle the authentication flow

CallingAppInfo

information pertaining to the calling app making the request

CreateCredentialRequest

the complete CreateCredentialRequest coming from the calling app that is requesting for credential creation

Public companion functions

asBundle

Added in 1.5.0-alpha06
@RequiresApi(value = 23)
fun asBundle(request: ProviderCreateCredentialRequest): Bundle

Helper method to convert the given request to a parcelable Bundle, in case the instance needs to be sent across a process. Consumers of this method should use fromBundle to reconstruct the class instance back from the bundle returned here.

fromBundle

Added in 1.5.0-alpha06
@RequiresApi(value = 23)
fun fromBundle(bundle: Bundle): ProviderCreateCredentialRequest

Helper method to convert a Bundle retrieved through asBundle, back to an instance of ProviderCreateCredentialRequest.

Throws IllegalArgumentException if the conversion fails. This means that the given bundle does not contain a ProviderCreateCredentialRequest. The bundle should be constructed and retrieved from asBundle itself and never be created from scratch to avoid the failure.

Public constructors

ProviderCreateCredentialRequest

Added in 1.5.0-alpha06
ProviderCreateCredentialRequest(
    callingRequest: CreateCredentialRequest,
    callingAppInfo: CallingAppInfo,
    biometricPromptResult: BiometricPromptResult? = null
)

constructs an instance of ProviderCreateCredentialRequest

Public properties

biometricPromptResult

Added in 1.5.0-alpha06
val biometricPromptResultBiometricPromptResult?

the result of a Biometric Prompt authentication flow, that is propagated to the provider if the provider requested for androidx.credentials.CredentialManager to handle the authentication flow

callingAppInfo

Added in 1.2.0
val callingAppInfoCallingAppInfo

information pertaining to the calling app making the request

callingRequest

Added in 1.2.0
val callingRequestCreateCredentialRequest

the complete CreateCredentialRequest coming from the calling app that is requesting for credential creation