interface ProviderEventsApiProvider


Provider interface to be implemented by the OEMs that will support provider events APIs.

Summary

Public functions

Boolean

Returns true if the provider is available on this device, or otherwise false.

Unit
onImportCredentials(
    context: Context,
    request: ImportCredentialsRequest,
    cancellationSignal: CancellationSignal?,
    executor: Executor,
    callback: CredentialManagerCallback<ProviderImportCredentialsResponseImportCredentialsException>
)

Invoked on a request to import credentials.

Unit
onRegisterExport(
    request: RegisterExportRequest,
    cancellationSignal: CancellationSignal?,
    executor: Executor,
    callback: CredentialManagerCallback<RegisterExportResponseRegisterExportException>
)

Invoked on a request to register accounts capable for exporting credentials.

Public functions

isAvailable

Added in 1.0.0-alpha03
fun isAvailable(): Boolean

Returns true if the provider is available on this device, or otherwise false.

onImportCredentials

Added in 1.0.0-alpha03
fun onImportCredentials(
    context: Context,
    request: ImportCredentialsRequest,
    cancellationSignal: CancellationSignal?,
    executor: Executor,
    callback: CredentialManagerCallback<ProviderImportCredentialsResponseImportCredentialsException>
): Unit

Invoked on a request to import credentials.

Parameters
context: Context

the client calling context used to potentially launch any UI

request: ImportCredentialsRequest

the request for importing the credentials

cancellationSignal: CancellationSignal?

an optional signal that allows for cancelling this call

executor: Executor

the callback will take place on this executor

callback: CredentialManagerCallback<ProviderImportCredentialsResponseImportCredentialsException>

the callback invoked when the request succeeds or fails

onRegisterExport

Added in 1.0.0-alpha03
fun onRegisterExport(
    request: RegisterExportRequest,
    cancellationSignal: CancellationSignal?,
    executor: Executor,
    callback: CredentialManagerCallback<RegisterExportResponseRegisterExportException>
): Unit

Invoked on a request to register accounts capable for exporting credentials.

Parameters
request: RegisterExportRequest

the request for registering export entries

cancellationSignal: CancellationSignal?

an optional signal that allows for cancelling this call

executor: Executor

the callback will take place on this executor

callback: CredentialManagerCallback<RegisterExportResponseRegisterExportException>

the callback invoked when the request succeeds or fails