# DeviceSetupService

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/service/DeviceSetupService.kt+class:androidx.credentials.providerevents.service.DeviceSetupService) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-alpha06)

*** ** * ** ***

<br />

```
public abstract class DeviceSetupService extends Service
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||
| ↳ | [android.content.Context](https://developer.android.com/reference/android/content/Context.html) ||||
|   | ↳ | [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) |||
|   |   | ↳ | [android.app.Service](https://developer.android.com/reference/android/app/Service.html) ||
|   |   |   | ↳ | [androidx.credentials.providerevents.service.DeviceSetupService](https://developer.android.com/reference/androidx/credentials/providerevents/service/DeviceSetupService) |

*** ** * ** ***

This service builds upon the functionality of `https://developer.android.com/reference/androidx/credentials/provider/CredentialProviderService` by enabling support for more advanced credential requests, such as device setup.

Note that this service is distinct from `https://developer.android.com/reference/androidx/credentials/provider/CredentialProviderService`, which handles basic credential saving and retrieval requests. This service is mainly used to help with user pain point of credentials onboarding during device setup. When the user is setting up a new device, the credential provider can assist with the onboarding by either transferring the credentials to the new device, or receiving the credentials if the current device is the one doing the onboarding.

This service is bound only during the duration of an API call. To receive requests, users must enable the corresponding `https://developer.android.com/reference/androidx/credentials/provider/CredentialProviderService` from within the same package, in Android Settings. This service will be invoked as part of Android onboarding and will not contain any UI as part of the process.

## Basic Usage

The interaction between Credential Manager and this service typically involves:

- The Android system forwards the request to enabled credential providers that support the requested feature.

- Credential providers receive the request, process it, and return an appropriate response.

- The Android system sends the result back to the client application.

This flow is designed to minimize the service's lifecycle. Calls to the service are stateless. If a service requires maintaining states between calls, it must implement its own state management. Note that the service's process may be terminated by the Android System when unbound, such as during low-memory conditions.

## Service Registration

To enable Credential Manager to send requests to a provider service, the provider must:

- Extend this class and implement the required methods.

- Declare this service class within Android Manifest with corresponding intent action "androidx.credentials.DEVICE_SETUP_SERVICE_ACTION".

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/providerevents/service/DeviceSetupService#DeviceSetupService()()` |

| ### Public methods |
|---|---|
| `final https://developer.android.com/reference/android/os/IBinder.html` | `https://developer.android.com/reference/androidx/credentials/providerevents/service/DeviceSetupService#onBind(android.content.Intent)(https://developer.android.com/reference/android/content/Intent.html intent)` |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/providerevents/service/DeviceSetupService#onExportCredentialsRequest(androidx.credentials.providerevents.transfer.ExportCredentialsRequest,androidx.credentials.provider.CallingAppInfo,androidx.core.os.OutcomeReceiverCompat)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ExportCredentialsRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/os/OutcomeReceiverCompat<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ExportCredentialsResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ExportCredentialsException> callback )` Called when a credential provider should receive credentials for device setup. |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/providerevents/service/DeviceSetupService#onGetCredentialTransferCapabilities(androidx.credentials.providerevents.transfer.CredentialTransferCapabilitiesRequest,androidx.credentials.provider.CallingAppInfo,androidx.core.os.OutcomeReceiverCompat)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/CredentialTransferCapabilitiesRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/os/OutcomeReceiverCompat<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/CredentialTransferCapabilities, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/GetCredentialTransferCapabilitiesException> callback )` Called when a credential provider should return the state of its credentials to the user. |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/providerevents/service/DeviceSetupService#onImportCredentialsRequest(androidx.credentials.providerevents.transfer.ImportCredentialsRequest,androidx.credentials.provider.CallingAppInfo,androidx.core.os.OutcomeReceiverCompat)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ImportCredentialsRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/os/OutcomeReceiverCompat<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ImportCredentialsResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ImportCredentialsException> callback )` Called when a credential provider should return credentials for device setup. |

### Inherited methods

From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `boolean` `https://developer.android.com/reference/android/content/Context.html#bindIsolatedService(android.content.Intent, android.content.Context.BindServiceFlags, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceName,

@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/android/content/ServiceConnection.html conn

)` `final int` `https://developer.android.com/reference/android/content/Context.html#getColor(int)(int id)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/ColorStateList.html` `https://developer.android.com/reference/android/content/Context.html#getColorStateList(int)(int id)` `final https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/content/Context.html#getDrawable(int)(int id)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#getString(int)(int resId)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#getString(int, java.lang.Object...)(int resId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html... formatArgs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.Class&lt;T&gt;)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> serviceClass)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/android/content/Context.html#getText(int)(int resId)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html` `https://developer.android.com/reference/android/content/Context.html#getUpdateableFlags()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(int[])(@https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(int, int[])(int resid, @https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[])(https://developer.android.com/reference/android/util/AttributeSet.html set, @https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[], int, int)(

https://developer.android.com/reference/android/util/AttributeSet.html set,

@https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs,

int defStyleAttr,

int defStyleRes

)` `void` `https://developer.android.com/reference/android/content/Context.html#revokeSelfPermissionOnKill(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permName)` `void` `https://developer.android.com/reference/android/content/Context.html#sendBroadcastWithMultiplePermissions(android.content.Intent, java.lang.String[])(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

@https://developer.android.com/reference/androidx/annotation/NonNull String[] receiverPermissions

)` From [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindIsolatedService(android.content.Intent, int, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

int flags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceName,

@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/android/content/ServiceConnection.html conn

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,

int flags

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.Context.BindServiceFlags, java.util.concurrent.Executor, android.content.ServiceConnection)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,

@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/android/content/ServiceConnection.html conn

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, int, java.util.concurrent.Executor, android.content.ServiceConnection)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

int flags,

@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/android/content/ServiceConnection.html conn

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags, android.os.UserHandle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, int, android.os.UserHandle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,

int flags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user

)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfPermission(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermission(android.net.Uri, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)` `@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermissions(java.util.List&lt;android.net.Uri&gt;, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> uris,

int modeFlags

)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingPermission(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermission(android.net.Uri, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)` `@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermissions(java.util.List&lt;android.net.Uri&gt;, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> uris, int modeFlags)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkContentUriPermissionFull(android.net.Uri, int, int, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,

int pid,

int uid,

int modeFlags

)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkPermission(java.lang.String, int, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission, int pid, int uid)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkSelfPermission(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, int, int, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int pid, int uid, int modeFlags)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int)(

https://developer.android.com/reference/android/net/Uri.html uri,

https://developer.android.com/reference/java/lang/String.html readPermission,

https://developer.android.com/reference/java/lang/String.html writePermission,

int pid,

int uid,

int modeFlags

)` `@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermissions(java.util.List&lt;android.net.Uri&gt;, int, int, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> uris,

int pid,

int uid,

int modeFlags

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#clearWallpaper()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createAttributionContext(java.lang.String)(https://developer.android.com/reference/java/lang/String.html attributionTag)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createConfigurationContext(android.content.res.Configuration)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html overrideConfiguration)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createContext(android.content.ContextParams)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ContextParams.html contextParams)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createContextForSplit(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html splitName)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceContext(int)(int deviceId)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceProtectedStorageContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDisplayContext(android.view.Display)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Display.html display)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createPackageContext(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html packageName, int flags)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(int, android.os.Bundle)(int type, https://developer.android.com/reference/android/os/Bundle.html options)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(android.view.Display, int, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Display.html display, int type, https://developer.android.com/reference/android/os/Bundle.html options)` `@https://developer.android.com/reference/androidx/annotation/NonNull String[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#databaseList()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteDatabase(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteFile(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteSharedPreferences(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission,

https://developer.android.com/reference/java/lang/String.html message

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,

int modeFlags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingPermission(java.lang.String, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission, https://developer.android.com/reference/java/lang/String.html message)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingUriPermission(android.net.Uri, int, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,

int modeFlags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforcePermission(java.lang.String, int, int, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission,

int pid,

int uid,

https://developer.android.com/reference/java/lang/String.html message

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,

int pid,

int uid,

int modeFlags,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String)(

https://developer.android.com/reference/android/net/Uri.html uri,

https://developer.android.com/reference/java/lang/String.html readPermission,

https://developer.android.com/reference/java/lang/String.html writePermission,

int pid,

int uid,

int modeFlags,

https://developer.android.com/reference/java/lang/String.html message

)` `@https://developer.android.com/reference/androidx/annotation/NonNull String[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#fileList()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationInfo()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/AssetManager.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAssets()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/AttributionSource.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionSource()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionTag()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getBaseContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getCacheDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/ClassLoader.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getClassLoader()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getCodeCacheDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ContentResolver.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getContentResolver()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDataDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDatabasePath(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDeviceId()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDir(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, int mode)` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Display.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDisplay()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDirs()()` `https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDir(java.lang.String)(https://developer.android.com/reference/java/lang/String.html type)` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDirs(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html type)` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalMediaDirs()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getFileStreamPath(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getFilesDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getMainExecutor()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Looper.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getMainLooper()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getNoBackupFilesDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDirs()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getOpPackageName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageCodePath()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/pm/PackageManager.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageManager()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageResourcePath()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/ContextParams.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getParams()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getResources()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/SharedPreferences.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSharedPreferences(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, int mode)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemService(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemServiceName(java.lang.Class&lt;?&gt;)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> serviceClass)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.Theme.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getTheme()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaper())()`

**This method is deprecated.** Deprecated in Java
`int` `[getWallpaperDesiredMinimumHeight](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumHeight())()`

**This method is deprecated.** Deprecated in Java
`int` `[getWallpaperDesiredMinimumWidth](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumWidth())()`

**This method is deprecated.** Deprecated in Java
`void` `https://developer.android.com/reference/android/content/ContextWrapper.html#grantUriPermission(java.lang.String, android.net.Uri, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html toPackage,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,

int modeFlags

)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#isDeviceProtectedStorage()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#isRestricted()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#isUiContext()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#moveDatabaseFrom(android.content.Context, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html sourceContext, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#moveSharedPreferencesFrom(android.content.Context, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html sourceContext,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name

)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/FileInputStream.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openFileInput(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/FileOutputStream.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openFileOutput(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, int mode)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,

int mode,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html factory

)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,

int mode,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html factory,

https://developer.android.com/reference/android/database/DatabaseErrorHandler.html errorHandler

)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#peekWallpaper()()` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#rebindService(android.content.ServiceConnection, android.content.Context.BindServiceFlags)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerComponentCallbacks(android.content.ComponentCallbacks)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentCallbacks.html callback)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerDeviceIdChangeListener(java.util.concurrent.Executor, java.util.function.IntConsumer)(

@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/java/util/function/IntConsumer.html listener

)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)(

https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter

)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, int)(

https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,

int flags

)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler)(

https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,

https://developer.android.com/reference/java/lang/String.html broadcastPermission,

https://developer.android.com/reference/android/os/Handler.html scheduler

)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler, int)(

https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,

https://developer.android.com/reference/java/lang/String.html broadcastPermission,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int flags

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcast(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeSelfPermissionsOnKill(java.util.Collection&lt;java.lang.String&gt;)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> permissions

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(android.net.Uri, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(java.lang.String, android.net.Uri, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html targetPackage,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,

int modeFlags

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/java/lang/String.html receiverPermission)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/android/os/Bundle.html options

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user,

https://developer.android.com/reference/java/lang/String.html receiverPermission

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/java/lang/String.html receiverPermission)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/android/os/Bundle.html options

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int initialCode,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/android/os/Bundle.html options,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int initialCode,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/java/lang/String.html receiverAppOp,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int initialCode,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, int, java.lang.String, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, java.lang.String, android.os.Bundle, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

int initialCode,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/java/lang/String.html receiverAppOp,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras,

https://developer.android.com/reference/android/os/Bundle.html options

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user,

https://developer.android.com/reference/java/lang/String.html receiverPermission,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int initialCode,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int initialCode,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user,

https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,

https://developer.android.com/reference/android/os/Handler.html scheduler,

int initialCode,

https://developer.android.com/reference/java/lang/String.html initialData,

https://developer.android.com/reference/android/os/Bundle.html initialExtras

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#setTheme(int)(int resid)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(android.graphics.Bitmap)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Bitmap.html bitmap)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(java.io.InputStream)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/InputStream.html data)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[])(@https://developer.android.com/reference/androidx/annotation/NonNull Intent[] intents)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[], android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull Intent[] intents, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivity(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivity(android.content.Intent, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/Bundle.html options)` `https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startForegroundService(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html className,

https://developer.android.com/reference/java/lang/String.html profileFile,

https://developer.android.com/reference/android/os/Bundle.html arguments

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent,

https://developer.android.com/reference/android/content/Intent.html fillInIntent,

int flagsMask,

int flagsValues,

int extraFlags

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent,

https://developer.android.com/reference/android/content/Intent.html fillInIntent,

int flagsMask,

int flagsValues,

int extraFlags,

https://developer.android.com/reference/android/os/Bundle.html options

)` `https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startService(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#stopService(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html name)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unbindService(android.content.ServiceConnection)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterComponentCallbacks(android.content.ComponentCallbacks)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentCallbacks.html callback)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterDeviceIdChangeListener(java.util.function.IntConsumer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/function/IntConsumer.html listener)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterReceiver(android.content.BroadcastReceiver)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceBindings(java.util.Collection&lt;android.content.Context.UpdateBindingParams&gt;)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.UpdateBindingParams.html> params

)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceGroup(android.content.ServiceConnection, int, int)(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,

int group,

int importance

)` From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `void` `https://developer.android.com/reference/android/app/Service.html#attachBaseContext(android.content.Context)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html newBase)` `void` `https://developer.android.com/reference/android/app/Service.html#dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[])(

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/FileDescriptor.html fd,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html writer,

@https://developer.android.com/reference/androidx/annotation/NonNull String[] args

)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Application.html` `https://developer.android.com/reference/android/app/Service.html#getApplication()()` `final int` `https://developer.android.com/reference/android/app/Service.html#getForegroundServiceType()()` `void` `https://developer.android.com/reference/android/app/Service.html#onConfigurationChanged(android.content.res.Configuration)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html newConfig)` `void` `https://developer.android.com/reference/android/app/Service.html#onCreate()()` `void` `https://developer.android.com/reference/android/app/Service.html#onDestroy()()` `void` `https://developer.android.com/reference/android/app/Service.html#onLowMemory()()` `void` `https://developer.android.com/reference/android/app/Service.html#onRebind(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/app/Service.html#onStart(android.content.Intent, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, int startId)` `int` `https://developer.android.com/reference/android/app/Service.html#onStartCommand(android.content.Intent, int, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, int flags, int startId)` `void` `https://developer.android.com/reference/android/app/Service.html#onTaskRemoved(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html rootIntent)` `void` `https://developer.android.com/reference/android/app/Service.html#onTimeout(int)(int startId)` `void` `https://developer.android.com/reference/android/app/Service.html#onTimeout(int, int)(int startId, int fgsType)` `void` `https://developer.android.com/reference/android/app/Service.html#onTrimMemory(int)(int level)` `boolean` `https://developer.android.com/reference/android/app/Service.html#onUnbind(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `final void` `https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification)(int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Notification.html notification)` `final void` `https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification, int)(

int id,

@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Notification.html notification,

int foregroundServiceType

)` `final void` `https://developer.android.com/reference/android/app/Service.html#stopForeground(int)(int notificationBehavior)` `final void` `https://developer.android.com/reference/android/app/Service.html#stopForeground(boolean)(boolean removeNotification)` `final void` `https://developer.android.com/reference/android/app/Service.html#stopSelf()()` `final void` `https://developer.android.com/reference/android/app/Service.html#stopSelf(int)(int startId)` `final boolean` `https://developer.android.com/reference/android/app/Service.html#stopSelfResult(int)(int startId)`

## Public constructors

### DeviceSetupService

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

```
public DeviceSetupService()
```

## Public methods

### onBind

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

```
public final IBinder onBind(Intent intent)
```

### onExportCredentialsRequest

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

```
public abstract void onExportCredentialsRequest(
    @NonNull ExportCredentialsRequest request,
    @NonNull CallingAppInfo callingAppInfo,
    @NonNull OutcomeReceiverCompat<@NonNull ExportCredentialsResponse, @NonNull ExportCredentialsException> callback
)
```

Called when a credential provider should receive credentials for device setup.

This method should be extended by credential providers to receive credential push requests. When the current device is being setup with a paired device, the credentials from the paired device can be transferred to the current device.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ExportCredentialsRequest request` | The request for pushing the credentials to this device. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo` | the requesting app info |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/os/OutcomeReceiverCompat<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ExportCredentialsResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ExportCredentialsException> callback` | The callback to receive the result of the credential push. |

### onGetCredentialTransferCapabilities

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

```
public abstract void onGetCredentialTransferCapabilities(
    @NonNull CredentialTransferCapabilitiesRequest request,
    @NonNull CallingAppInfo callingAppInfo,
    @NonNull OutcomeReceiverCompat<@NonNull CredentialTransferCapabilities, @NonNull GetCredentialTransferCapabilitiesException> callback
)
```

Called when a credential provider should return the state of its credentials to the user.

This method should be extended by credential providers to facilitate with device setup. When the current device is used to facilitate the device setup of another device, the Android System can request for the number of credentials that can be transferred and their size. These info can be displayed to the user during the setup process.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/CredentialTransferCapabilitiesRequest request` | The request for the state of the transferable credentials to this device. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo` | the requesting app info |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/os/OutcomeReceiverCompat<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/CredentialTransferCapabilities, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/GetCredentialTransferCapabilitiesException> callback` | The callback to receive the result of the request. |

### onImportCredentialsRequest

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

```
public abstract void onImportCredentialsRequest(
    @NonNull ImportCredentialsRequest request,
    @NonNull CallingAppInfo callingAppInfo,
    @NonNull OutcomeReceiverCompat<@NonNull ImportCredentialsResponse, @NonNull ImportCredentialsException> callback
)
```

Called when a credential provider should return credentials for device setup.

This method should be extended by credential providers to receive credential fetch requests. When the current device is used to facilitate the device setup of another device, the Android System can request for the credentials stored on this device to be transferred to the new device.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ImportCredentialsRequest request` | The request for pulling the credentials from this device. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo` | the requesting app info |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/os/OutcomeReceiverCompat<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/transfer/ImportCredentialsResponse, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/providerevents/exception/ImportCredentialsException> callback` | The callback to receive the result of the credential fetching. |