public interface ProviderEventsApiProvider


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

Summary

Public methods

abstract boolean

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

abstract void

Invoked on a request to import credentials.

abstract void

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

Public methods

isAvailable

Added in 1.0.0-alpha03
abstract boolean isAvailable()

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

onImportCredentials

Added in 1.0.0-alpha03
abstract void onImportCredentials(
    @NonNull Context context,
    @NonNull ImportCredentialsRequest request,
    CancellationSignal cancellationSignal,
    @NonNull Executor executor,
    @NonNull CredentialManagerCallback<@NonNull ProviderImportCredentialsResponse, @NonNull ImportCredentialsException> callback
)

Invoked on a request to import credentials.

Parameters
@NonNull Context context

the client calling context used to potentially launch any UI

@NonNull ImportCredentialsRequest request

the request for importing the credentials

CancellationSignal cancellationSignal

an optional signal that allows for cancelling this call

@NonNull Executor executor

the callback will take place on this executor

@NonNull CredentialManagerCallback<@NonNull ProviderImportCredentialsResponse, @NonNull ImportCredentialsException> callback

the callback invoked when the request succeeds or fails

onRegisterExport

Added in 1.0.0-alpha03
abstract void onRegisterExport(
    @NonNull RegisterExportRequest request,
    CancellationSignal cancellationSignal,
    @NonNull Executor executor,
    @NonNull CredentialManagerCallback<@NonNull RegisterExportResponse, @NonNull RegisterExportException> callback
)

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

Parameters
@NonNull RegisterExportRequest request

the request for registering export entries

CancellationSignal cancellationSignal

an optional signal that allows for cancelling this call

@NonNull Executor executor

the callback will take place on this executor

@NonNull CredentialManagerCallback<@NonNull RegisterExportResponse, @NonNull RegisterExportException> callback

the callback invoked when the request succeeds or fails