# ProviderEventsApiProvider

Artifact: [androidx.credentials.providerevents:providerevents](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents) [View Source](https://cs.android.com/search?q=file:androidx/credentials/providerevents/ProviderEventsApiProvider.kt+class:androidx.credentials.providerevents.ProviderEventsApiProvider) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-beta01)

*** ** * ** ***


```
public interface ProviderEventsApiProvider
```

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/androidx/credentials/providerevents/ProviderEventsApiProvider#isAvailable()()` Returns true if the provider is available on this device, or otherwise false. |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/providerevents/ProviderEventsApiProvider#onClearExport(androidx.credentials.providerevents.transfer.ClearExportRequest,java.util.concurrent.Executor,androidx.credentials.CredentialManagerCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ClearExportRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ClearExportResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ClearExportException> callback )` Invoked on a request to clear all accounts registered for exporting credentials. |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/providerevents/ProviderEventsApiProvider#onImportCredentials(android.content.Context,androidx.credentials.providerevents.transfer.ImportCredentialsRequest,android.os.CancellationSignal,java.util.concurrent.Executor,androidx.credentials.CredentialManagerCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ImportCredentialsRequest request, https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ProviderImportCredentialsResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ImportCredentialsException> callback )` Invoked on a request to import credentials. |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/providerevents/ProviderEventsApiProvider#onRegisterExport(androidx.credentials.providerevents.transfer.RegisterExportRequest,java.util.concurrent.Executor,androidx.credentials.CredentialManagerCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/RegisterExportRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/RegisterExportResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/RegisterExportException> callback )` Invoked on a request to register accounts capable for exporting credentials. |

## Public methods

### isAvailable

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-beta01)

```
abstract boolean isAvailable()
```

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

### onClearExport

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-beta01)

```
abstract void onClearExport(
    @NonNull ClearExportRequest request,
    @NonNull Executor executor,
    @NonNull CredentialManagerCallback<@NonNull ClearExportResponse, @NonNull ClearExportException> callback
)
```

Invoked on a request to clear all accounts registered for exporting credentials.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ClearExportRequest request` | the request for clearing all export entries |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | the callback will take place on this executor |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ClearExportResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ClearExportException> callback` | the callback invoked when the request succeeds or fails |

### onImportCredentials

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-beta01)

```
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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | the client calling context used to potentially launch any UI |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ImportCredentialsRequest request` | the request for importing the credentials |
| `https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal` | an optional signal that allows for cancelling this call |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | the callback will take place on this executor |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ProviderImportCredentialsResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ImportCredentialsException> callback` | the callback invoked when the request succeeds or fails |

### onRegisterExport

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-beta01)

```
abstract void onRegisterExport(
    @NonNull RegisterExportRequest request,
    @NonNull Executor executor,
    @NonNull CredentialManagerCallback<@NonNull RegisterExportResponse, @NonNull RegisterExportException> callback
)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/RegisterExportRequest request` | the request for registering export entries |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | the callback will take place on this executor |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/RegisterExportResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/RegisterExportException> callback` | the callback invoked when the request succeeds or fails |