# ComplicationDataSourceService

Artifact: [androidx.wear.watchface:watchface-complications-data-source](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt+class:androidx.wear.watchface.complications.datasource.ComplicationDataSourceService) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

*** ** * ** ***


```
abstract class ComplicationDataSourceService : Service
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.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.wear.watchface.complications.datasource.ComplicationDataSourceService](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService) |

Known direct subclasses [SuspendingComplicationDataSourceService](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/SuspendingComplicationDataSourceService), [SuspendingTimelineComplicationDataSourceService](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/SuspendingTimelineComplicationDataSourceService)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/SuspendingComplicationDataSourceService` | Kotlin coroutine wrapper for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` producing `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData`. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/SuspendingTimelineComplicationDataSourceService` | Kotlin coroutine wrapper for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` producing `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataTimeline`. |

*** ** * ** ***

Class for sources of complication data.

A complication data source service must implement `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)` to respond to requests for updates from the complication system.

Manifest requirements:

- The manifest declaration of this service must include an intent filter for `android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST`.

- A ComplicationDataSourceService must include a `meta-data` tag with `android.support.wearable.complications.SUPPORTED_TYPES` in its manifest entry.

The value of `android.support.wearable.complications.SUPPORTED_TYPES` should be a comma separated list of types supported by the data source, from this table:

|---|---|
| Androidx class | Tag name |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/GoalProgressComplicationData` | GOAL_PROGRESS |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/LongTextComplicationData` | LONG_TEXT |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/MonochromaticImageComplicationData` | ICON |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PhotoImageComplicationData` | LARGE_IMAGE |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/RangedValueComplicationData` | RANGED_TEXT |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ShortTextComplicationData` | SHORT_TEXT |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImageComplicationData` | SMALL_IMAGE |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/WeightedElementsComplicationData` | WEIGHTED_ELEMENTS |

The order in which types are listed has no significance. In the case where a watch face supports multiple types in a single complication slot, the watch face will determine which types it prefers.

For example, a complication data source that supports the `RANGED_VALUE`, `SHORT_TEXT`, and `ICON` types would include the following in its manifest entry:

```kotlin
<meta-data
    android:name="android.support.wearable.complications.SUPPORTED_TYPES"
    android:value="RANGED_VALUE,SHORT_TEXT,ICON" />
```

From android T onwards, it is recommended for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService`s to be direct boot aware because the system is able to fetch complications before the lock screen has been removed. To do this add `android:directBootAware="true"` to your service tag.

- A provider can choose to trust one or more watch faces by including the following in its manifest entry:

```kotlin
<meta-data
    android:name="android.support.wearable.complications.SAFE_WATCH_FACES"
    android:value="com.pkg1/com.trusted.wf1,com.pkg2/com.trusted.wf2" />
```

The listed watch faces will not need `com.google.android.wearable.permission.RECEIVE_COMPLICATION_DATA` in order to receive complications from this provider. Also the provider may choose to serve different types to safe watch faces by including the following in its manifest:

```kotlin
<meta-data
    android:name="androidx.wear.watchface.complications.datasource.SAFE_WATCH_FACE_SUPPORTED_TYPES"
    android:value="ICON" />
```

In addition the provider can learn if a request is for a safe watchface by examining `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest#isForSafeWatchFace()`. Note `SAFE_WATCH_FACE_SUPPORTED_TYPES` and `isForSafeWatchFace` are gated behind the privileged permission `com.google.wear.permission.GET_IS_FOR_SAFE_WATCH_FACE`.

- A ComplicationDataSourceService should include a `meta-data` tag with `android.support.wearable.complications.UPDATE_PERIOD_SECONDS` in its manifest entry. The value of this tag is the number of seconds the complication data source would like to elapse between update requests.

**Note that update requests are not guaranteed to be sent with this frequency.** For complications with frequent updates they can also register a separate `meta-data` tag with `androidx.wear.watchface.complications.data.source.IMMEDIATE_UPDATE_PERIOD_MILLISECONDS` in their manifest which supports sampling at up to 1Hz when the watch face is visible and non-ambient, however this also requires the application to have the privileged permission `com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE`.

If a complication data source never needs to receive update requests beyond the one sent when a complication is activated, the value of this tag should be 0.

For example, a complication data source that would like to update at most every hour should include the following in its manifest entry:

```kotlin
<meta-data
    android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
    android:value="3600" />
```

- A `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` can include a `meta-data` tag with android.support.wearable.complications.PROVIDER_CONFIG_ACTION its manifest entry to cause a configuration activity to be shown when the complication data source is selected.

The configuration activity must reside in the same package as the complication data source, and must register an intent filter for the action specified here, including `android.support.wearable.complications.category.PROVIDER_CONFIG` as well as `https://developer.android.com/reference/android/content/Intent.html#CATEGORY_DEFAULT` as categories.

Note back up and restore of any configuration data is left to the complication data source, see `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_CONFIG_RESTORE_SUPPORTED()` for more details.

The complication id being configured will be included in the intent that starts the config activity using the extra key `android.support.wearable.complications.EXTRA_CONFIG_COMPLICATION_ID`.

The complication type that will be requested from the complication data source will also be included, using the extra key `android.support.wearable.complications.EXTRA_CONFIG_COMPLICATION_TYPE`.

The complication data source's `https://developer.android.com/reference/android/content/ComponentName.html` will also be included in the intent that starts the config activity, using the extra key `android.support.wearable.complications.EXTRA_CONFIG_PROVIDER_COMPONENT`.

The config activity must call `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` with either `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` or `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` before it is finished, to tell the system whether or not the complication data source should be set on the given complication.

It is possible to provide additional `meta-data` tag `androidx.watchface.complications.datasource.DEFAULT_CONFIG_SUPPORTED` in the service set to `"true"` to let the system know that the data source is able to provide complication data before it is configured.

- The manifest entry for the service should also include an android:icon attribute. The icon provided there should be a single-color white icon that represents the complication data source. This icon will be shown in the complication data source chooser interface, and may also be included in `https://developer.android.com/reference/android/support/wearable/complications/ComplicationProviderInfo.html` given to watch faces for display in their configuration activities.

- The manifest entry should also include `android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER"` to ensure that only the system can bind to it.

Multiple complication data sources in the same APK are supported but in android R there's a soft limit of 100 data sources per APK. Above that the companion watchface editor won't support this complication data source app.

There's no need to call `setDataSource` for any the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` Builders because the system will append this value on your behalf.

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.ComplicationRequestListener` Callback for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)` where only one of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.ComplicationRequestListener#onComplicationData(androidx.wear.watchface.complications.data.ComplicationData)` or `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.ComplicationRequestListener#onComplicationDataTimeline(androidx.wear.watchface.complications.datasource.ComplicationDataTimeline)` should be called. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#ACTION_COMPLICATION_UPDATE_REQUEST()` The intent action used to send update requests to the data source. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#CATEGORY_DATA_SOURCE_CONFIG()` Category for complication data source config activities. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#EXTRA_CONFIG_COMPLICATION_ID()` Extra used to supply the complication id to a complication data source configuration activity. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#EXTRA_CONFIG_COMPLICATION_TYPE()` Extra used to supply the complication type to a complication data source configuration activity. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#EXTRA_CONFIG_DATA_SOURCE_COMPONENT()` Extra used to supply the complication data source component to a complication data source configuration activity. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 34) https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_CONFIG_RESTORE_SUPPORTED()` Metadata key used to declare that the complication data source service supports backup and restore (B\&R) of complication configuration data. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_DATA_SOURCE_CONFIG_ACTION()` Metadata key used to declare an action for a configuration activity for a complication data source. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_DATA_SOURCE_DEFAULT_CONFIG_SUPPORTED()` Metadata key. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS()` Metadata key used to request elevated frequency of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)`s when the watch face is visible and non-ambient. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_SAFE_WATCH_FACES()` Metadata key used to declare a list of watch faces that may receive data from a complication data source before they are granted the RECEIVE_COMPLICATION_DATA permission. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_SAFE_WATCH_FACE_SUPPORTED_TYPES()` Metadata key used to declare supported complication types for safe watch faces. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_SUPPORTED_TYPES()` Metadata key used to declare supported complication types. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_UPDATE_PERIOD_SECONDS()` Metadata key used to declare the requested frequency of update requests. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#ComplicationDataSourceService()()` |

| ### Public functions |
|---|---|
| `abstract https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#getPreviewData(androidx.wear.watchface.complications.data.ComplicationType)(type: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType)` A request for representative preview data for the complication, for use in the editor UI. |
| `final https://developer.android.com/reference/android/os/IBinder.html?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onBind(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationActivated(kotlin.Int,androidx.wear.watchface.complications.data.ComplicationType)( complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, type: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType )` Called when a complication is activated. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationDeactivated(kotlin.Int)(complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Called when a complication is deactivated. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)( request: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest, listener: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.ComplicationRequestListener )` Called when a complication data update is requested for the given complication id. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStartImmediateComplicationRequests(kotlin.Int)(complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` If a metadata key with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS()` is present in the manifest, and the provider has privileged permission `com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE`, then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStartImmediateComplicationRequests(kotlin.Int)` will be called when the watch face is visible and non-ambient. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStopImmediateComplicationRequests(kotlin.Int)(complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` If a metadata key with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS()` is present in the manifest, and the provider has privileged permission `com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE`, then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStartImmediateComplicationRequests(kotlin.Int)` will be called when the watch face ceases to be visible and non-ambient. |

### Inherited functions

From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `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)(
service: https://developer.android.com/reference/android/content/Intent.html,
flags: https://developer.android.com/reference/android/content/Context.BindServiceFlags.html,
instanceName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html,
executor: https://developer.android.com/reference/java/util/concurrent/Executor.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#getColor(int)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/android/content/res/ColorStateList.html` `https://developer.android.com/reference/android/content/Context.html#getColorStateList(int)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html?` `https://developer.android.com/reference/android/content/Context.html#getDrawable(int)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/content/Context.html#getString(int)(resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/content/Context.html#getString(int, java.lang.Object...)(resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, vararg formatArgs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` `T` `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.Class&lt;T&gt;)(serviceClass: https://developer.android.com/reference/java/lang/Class.html<T>)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` `https://developer.android.com/reference/android/content/Context.html#getText(int)(resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(int[])(attrs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html)` `https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(int, int[])(resid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, attrs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html)` `https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[])(set: https://developer.android.com/reference/android/util/AttributeSet.html?, attrs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html)` `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)(
set: https://developer.android.com/reference/android/util/AttributeSet.html?,
attrs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html,
defStyleAttr: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
defStyleRes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/Context.html#revokeSelfPermissionOnKill(java.lang.String)(permName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/Context.html#sendBroadcastWithMultiplePermissions(android.content.Intent, java.lang.String[])(
intent: https://developer.android.com/reference/android/content/Intent.html,
receiverPermissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>
)` From [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindIsolatedService(android.content.Intent, int, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection)(
service: https://developer.android.com/reference/android/content/Intent.html,
flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
instanceName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html,
executor: https://developer.android.com/reference/java/util/concurrent/Executor.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags)(
service: https://developer.android.com/reference/android/content/Intent.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html,
flags: https://developer.android.com/reference/android/content/Context.BindServiceFlags.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, int)(service: https://developer.android.com/reference/android/content/Intent.html, conn: https://developer.android.com/reference/android/content/ServiceConnection.html, flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.Context.BindServiceFlags, java.util.concurrent.Executor, android.content.ServiceConnection)(
service: https://developer.android.com/reference/android/content/Intent.html,
flags: https://developer.android.com/reference/android/content/Context.BindServiceFlags.html,
executor: https://developer.android.com/reference/java/util/concurrent/Executor.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, int, java.util.concurrent.Executor, android.content.ServiceConnection)(
service: https://developer.android.com/reference/android/content/Intent.html,
flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
executor: https://developer.android.com/reference/java/util/concurrent/Executor.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags, android.os.UserHandle)(
service: https://developer.android.com/reference/android/content/Intent.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html,
flags: https://developer.android.com/reference/android/content/Context.BindServiceFlags.html,
user: https://developer.android.com/reference/android/os/UserHandle.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, int, android.os.UserHandle)(
service: https://developer.android.com/reference/android/content/Intent.html,
conn: https://developer.android.com/reference/android/content/ServiceConnection.html,
flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
user: https://developer.android.com/reference/android/os/UserHandle.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfPermission(java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermission(android.net.Uri, int)(uri: https://developer.android.com/reference/android/net/Uri.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermissions(java.util.List&lt;android.net.Uri&gt;, int)(uris: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/android/net/Uri.html>, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingPermission(java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermission(android.net.Uri, int)(uri: https://developer.android.com/reference/android/net/Uri.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermissions(java.util.List&lt;android.net.Uri&gt;, int)(uris: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/android/net/Uri.html>, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkContentUriPermissionFull(android.net.Uri, int, int, int)(uri: https://developer.android.com/reference/android/net/Uri.html, pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkPermission(java.lang.String, int, int)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkSelfPermission(java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, int, int, int)(uri: https://developer.android.com/reference/android/net/Uri.html, pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int)(
uri: https://developer.android.com/reference/android/net/Uri.html?,
readPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
writePermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermissions(java.util.List&lt;android.net.Uri&gt;, int, int, int)(
uris: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/android/net/Uri.html>,
pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#clearWallpaper()()` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createAttributionContext(java.lang.String)(attributionTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createConfigurationContext(android.content.res.Configuration)(overrideConfiguration: https://developer.android.com/reference/android/content/res/Configuration.html)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createContext(android.content.ContextParams)(contextParams: https://developer.android.com/reference/android/content/ContextParams.html)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createContextForSplit(java.lang.String)(splitName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceContext(int)(deviceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceProtectedStorageContext()()` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDisplayContext(android.view.Display)(display: https://developer.android.com/reference/android/view/Display.html)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createPackageContext(java.lang.String, int)(packageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(int, android.os.Bundle)(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, options: https://developer.android.com/reference/android/os/Bundle.html?)` `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)(display: https://developer.android.com/reference/android/view/Display.html, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, options: https://developer.android.com/reference/android/os/Bundle.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` `https://developer.android.com/reference/android/content/ContextWrapper.html#databaseList()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteDatabase(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteFile(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteSharedPreferences(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String)(
uri: https://developer.android.com/reference/android/net/Uri.html,
modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingPermission(java.lang.String, java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingUriPermission(android.net.Uri, int, java.lang.String)(uri: https://developer.android.com/reference/android/net/Uri.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforcePermission(java.lang.String, int, int, java.lang.String)(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String)(
uri: https://developer.android.com/reference/android/net/Uri.html,
pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
uri: https://developer.android.com/reference/android/net/Uri.html?,
readPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
writePermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
pid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` `https://developer.android.com/reference/android/content/ContextWrapper.html#fileList()()` `https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDatabasePath(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDir(java.lang.String, int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/java/io/File.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDir(java.lang.String)(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/io/File.html>` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDirs(java.lang.String)(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getFileStreamPath(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://developer.android.com/reference/android/content/SharedPreferences.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSharedPreferences(java.lang.String, int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemService(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemServiceName(java.lang.Class&lt;?&gt;)(serviceClass: https://developer.android.com/reference/java/lang/Class.html<*>)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#grantUriPermission(java.lang.String, android.net.Uri, int)(toPackage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, uri: https://developer.android.com/reference/android/net/Uri.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#moveDatabaseFrom(android.content.Context, java.lang.String)(sourceContext: https://developer.android.com/reference/android/content/Context.html, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#moveSharedPreferencesFrom(android.content.Context, java.lang.String)(sourceContext: https://developer.android.com/reference/android/content/Context.html, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://developer.android.com/reference/java/io/FileInputStream.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openFileInput(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` `https://developer.android.com/reference/java/io/FileOutputStream.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openFileOutput(java.lang.String, int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `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)(
name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html,
mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
factory: https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html
)` `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)(
name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html,
mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
factory: https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html,
errorHandler: https://developer.android.com/reference/android/database/DatabaseErrorHandler.html?
)` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#peekWallpaper()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#rebindService(android.content.ServiceConnection, android.content.Context.BindServiceFlags)(conn: https://developer.android.com/reference/android/content/ServiceConnection.html, flags: https://developer.android.com/reference/android/content/Context.BindServiceFlags.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerComponentCallbacks(android.content.ComponentCallbacks)(callback: https://developer.android.com/reference/android/content/ComponentCallbacks.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerDeviceIdChangeListener(java.util.concurrent.Executor, java.util.function.IntConsumer)(executor: https://developer.android.com/reference/java/util/concurrent/Executor.html, listener: https://developer.android.com/reference/java/util/function/IntConsumer.html)` `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)(receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?, filter: https://developer.android.com/reference/android/content/IntentFilter.html)` `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)(
receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
filter: https://developer.android.com/reference/android/content/IntentFilter.html,
flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `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)(
receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
filter: https://developer.android.com/reference/android/content/IntentFilter.html,
broadcastPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?
)` `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)(
receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
filter: https://developer.android.com/reference/android/content/IntentFilter.html,
broadcastPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcast(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)(intent: https://developer.android.com/reference/android/content/Intent.html, user: https://developer.android.com/reference/android/os/UserHandle.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeSelfPermissionsOnKill(java.util.Collection&lt;java.lang.String&gt;)(permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-collection/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(android.net.Uri, int)(uri: https://developer.android.com/reference/android/net/Uri.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(java.lang.String, android.net.Uri, int)(targetPackage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, uri: https://developer.android.com/reference/android/net/Uri.html, modeFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String)(intent: https://developer.android.com/reference/android/content/Intent.html, receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String, android.os.Bundle)(intent: https://developer.android.com/reference/android/content/Intent.html, receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, options: https://developer.android.com/reference/android/os/Bundle.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle)(intent: https://developer.android.com/reference/android/content/Intent.html, user: https://developer.android.com/reference/android/os/UserHandle.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String)(
intent: https://developer.android.com/reference/android/content/Intent.html,
user: https://developer.android.com/reference/android/os/UserHandle.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String)(intent: https://developer.android.com/reference/android/content/Intent.html, receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle)(
intent: https://developer.android.com/reference/android/content/Intent.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
options: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
options: https://developer.android.com/reference/android/os/Bundle.html?,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
receiverAppOp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
receiverAppOp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?,
options: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
user: https://developer.android.com/reference/android/os/UserHandle.html,
receiverPermission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent, android.os.Bundle)(intent: https://developer.android.com/reference/android/content/Intent.html, options: https://developer.android.com/reference/android/os/Bundle.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)(intent: https://developer.android.com/reference/android/content/Intent.html, user: https://developer.android.com/reference/android/os/UserHandle.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)(
intent: https://developer.android.com/reference/android/content/Intent.html,
user: https://developer.android.com/reference/android/os/UserHandle.html,
resultReceiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?,
scheduler: https://developer.android.com/reference/android/os/Handler.html?,
initialCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
initialData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
initialExtras: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#setTheme(int)(resid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(android.graphics.Bitmap)(bitmap: https://developer.android.com/reference/android/graphics/Bitmap.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(java.io.InputStream)(data: https://developer.android.com/reference/java/io/InputStream.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[])(intents: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/android/content/Intent.html>)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[], android.os.Bundle)(intents: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/android/content/Intent.html>, options: https://developer.android.com/reference/android/os/Bundle.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivity(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startActivity(android.content.Intent, android.os.Bundle)(intent: https://developer.android.com/reference/android/content/Intent.html, options: https://developer.android.com/reference/android/os/Bundle.html?)` `https://developer.android.com/reference/android/content/ComponentName.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#startForegroundService(android.content.Intent)(service: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle)(
className: https://developer.android.com/reference/android/content/ComponentName.html,
profileFile: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?,
arguments: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)(
intent: https://developer.android.com/reference/android/content/IntentSender.html,
fillInIntent: https://developer.android.com/reference/android/content/Intent.html?,
flagsMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
flagsValues: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
extraFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)(
intent: https://developer.android.com/reference/android/content/IntentSender.html,
fillInIntent: https://developer.android.com/reference/android/content/Intent.html?,
flagsMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
flagsValues: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
extraFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
options: https://developer.android.com/reference/android/os/Bundle.html?
)` `https://developer.android.com/reference/android/content/ComponentName.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#startService(android.content.Intent)(service: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#stopService(android.content.Intent)(name: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#unbindService(android.content.ServiceConnection)(conn: https://developer.android.com/reference/android/content/ServiceConnection.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterComponentCallbacks(android.content.ComponentCallbacks)(callback: https://developer.android.com/reference/android/content/ComponentCallbacks.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterDeviceIdChangeListener(java.util.function.IntConsumer)(listener: https://developer.android.com/reference/java/util/function/IntConsumer.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterReceiver(android.content.BroadcastReceiver)(receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceBindings(java.util.Collection&lt;android.content.Context.UpdateBindingParams&gt;)(
params: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-collection/index.html<https://developer.android.com/reference/android/content/Context.UpdateBindingParams.html>
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceGroup(android.content.ServiceConnection, int, int)(conn: https://developer.android.com/reference/android/content/ServiceConnection.html, group: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, importance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#attachBaseContext(android.content.Context)(newBase: https://developer.android.com/reference/android/content/Context.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[])(fd: https://developer.android.com/reference/java/io/FileDescriptor.html, writer: https://developer.android.com/reference/java/io/PrintWriter.html, args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onConfigurationChanged(android.content.res.Configuration)(newConfig: https://developer.android.com/reference/android/content/res/Configuration.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onCreate()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onDestroy()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onLowMemory()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onRebind(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onStart(android.content.Intent, int)(intent: https://developer.android.com/reference/android/content/Intent.html, startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/app/Service.html#onStartCommand(android.content.Intent, int, int)(intent: https://developer.android.com/reference/android/content/Intent.html, flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onTaskRemoved(android.content.Intent)(rootIntent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onTimeout(int)(startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onTimeout(int, int)(startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, fgsType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#onTrimMemory(int)(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/app/Service.html#onUnbind(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, notification: https://developer.android.com/reference/android/app/Notification.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification, int)(
id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
notification: https://developer.android.com/reference/android/app/Notification.html,
foregroundServiceType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#stopForeground(int)(notificationBehavior: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#stopForeground(boolean)(removeNotification: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#stopSelf()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Service.html#stopSelf(int)(startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/app/Service.html#stopSelfResult(int)(startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

### Inherited properties

From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `open https://developer.android.com/reference/android/content/Context.BindServiceFlags.html` `https://developer.android.com/reference/android/content/Context.html#updateableFlags` From [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) `open https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#applicationContext` `open https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#applicationInfo` `open https://developer.android.com/reference/android/content/res/AssetManager.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#assets` `open https://developer.android.com/reference/android/content/AttributionSource.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#attributionSource` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#attributionTag` `open https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#baseContext` `open https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#cacheDir` `open https://developer.android.com/reference/java/lang/ClassLoader.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#classLoader` `open https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#codeCacheDir` `open https://developer.android.com/reference/android/content/ContentResolver.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#contentResolver` `open https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#dataDir` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#deviceId` `open https://developer.android.com/reference/android/view/Display.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#display` `open https://developer.android.com/reference/java/io/File.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#externalCacheDir` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/io/File.html>` `https://developer.android.com/reference/android/content/ContextWrapper.html#externalCacheDirs` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/io/File.html>` `https://developer.android.com/reference/android/content/ContextWrapper.html#externalMediaDirs` `open https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#filesDir` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#isDeviceProtectedStorage` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#isRestricted` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#isUiContext` `open https://developer.android.com/reference/java/util/concurrent/Executor.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#mainExecutor` `open https://developer.android.com/reference/android/os/Looper.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#mainLooper` `open https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#noBackupFilesDir` `open https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#obbDir` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/io/File.html>` `https://developer.android.com/reference/android/content/ContextWrapper.html#obbDirs` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#opPackageName` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#packageCodePath` `open https://developer.android.com/reference/android/content/pm/PackageManager.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#packageManager` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#packageName` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#packageResourcePath` `open https://developer.android.com/reference/android/content/ContextParams.html?` `https://developer.android.com/reference/android/content/ContextWrapper.html#params` `open https://developer.android.com/reference/android/content/res/Resources.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#resources` `open https://developer.android.com/reference/android/content/res/Resources.Theme.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#theme` `open https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#wallpaper`

**This property is deprecated.** Deprecated in Java
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#wallpaperDesiredMinimumHeight`

**This property is deprecated.** Deprecated in Java
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#wallpaperDesiredMinimumWidth`

**This property is deprecated.** Deprecated in Java
From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `https://developer.android.com/reference/android/app/Application.html` `https://developer.android.com/reference/android/app/Service.html#application` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/app/Service.html#foregroundServiceType`

## Constants

### ACTION_COMPLICATION_UPDATE_REQUEST

```
const val ACTION_COMPLICATION_UPDATE_REQUEST: String
```

The intent action used to send update requests to the data source. `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` must declare an intent filter for this action in the manifest.

### CATEGORY_DATA_SOURCE_CONFIG

```
const val CATEGORY_DATA_SOURCE_CONFIG: String
```

Category for complication data source config activities. The configuration activity for a complication complication data source must specify this category in its intent filter.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_DATA_SOURCE_CONFIG_ACTION()` |   |

### EXTRA_CONFIG_COMPLICATION_ID

```
const val EXTRA_CONFIG_COMPLICATION_ID: String
```

Extra used to supply the complication id to a complication data source configuration activity.

### EXTRA_CONFIG_COMPLICATION_TYPE

```
const val EXTRA_CONFIG_COMPLICATION_TYPE: String
```

Extra used to supply the complication type to a complication data source configuration activity.

### EXTRA_CONFIG_DATA_SOURCE_COMPONENT

```
const val EXTRA_CONFIG_DATA_SOURCE_COMPONENT: String
```

Extra used to supply the complication data source component to a complication data source configuration activity.

### METADATA_KEY_CONFIG_RESTORE_SUPPORTED

```
@RequiresApi(value = 34)
const val METADATA_KEY_CONFIG_RESTORE_SUPPORTED: String
```

Metadata key used to declare that the complication data source service supports backup and restore (B\&R) of complication configuration data. The system is responsible for backup and restore of the assignment of complications to watch faces, but responsibility for backup and restore for any complication data source configuration data is left to the data source.

If this flag is set to false, then the system will restore any complications using this provider in the "not configured" state, i.e. the complication will show a + sign with a tap action leading to the complication data source's configuration action as defined by `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_DATA_SOURCE_CONFIG_ACTION()`, instead of real data.

This is a boolean value, defaulting to true, which means apps are opted in by default but can explicitly opt out by setting this meta-data tag to false.

The value is ignored (equivalent to false) if the app does not enable Android B\&R ( https://developer.android.com/guide/topics/data/backup). This value is also ignored prior to Android U.

### METADATA_KEY_DATA_SOURCE_CONFIG_ACTION

```
const val METADATA_KEY_DATA_SOURCE_CONFIG_ACTION: String
```

Metadata key used to declare an action for a configuration activity for a complication data source.

A `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` can include a `meta-data` tag with this name in its manifest entry to cause a configuration activity to be shown when the complication data source is selected.

The configuration activity must reside in the same package as the complication data source, and must register an intent filter for the action specified here, including `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#CATEGORY_DATA_SOURCE_CONFIG()` as well as `https://developer.android.com/reference/android/content/Intent.html#CATEGORY_DEFAULT` as categories.

The complication id being configured will be included in the intent that starts the config activity using the extra key `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#EXTRA_CONFIG_COMPLICATION_ID()`.

The complication type that will be requested from the complication data source will also be included, using the extra key `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#EXTRA_CONFIG_COMPLICATION_TYPE()`.

The complication data source's `https://developer.android.com/reference/android/content/ComponentName.html` will also be included in the intent that starts the config activity, using the extra key `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#EXTRA_CONFIG_DATA_SOURCE_COMPONENT()`.

The config activity must call `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` with either `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` or `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` before it is finished, to tell the system whether or not the complication data source should be set on the given complication.

### METADATA_KEY_DATA_SOURCE_DEFAULT_CONFIG_SUPPORTED

```
const val METADATA_KEY_DATA_SOURCE_DEFAULT_CONFIG_SUPPORTED: String
```

Metadata key. Setting to "true" indicates to the system that this complication data source with a PROVIDER_CONFIG_ACTION metadata tag is able to provide complication data before it is configured. See `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_DATA_SOURCE_CONFIG_ACTION()`.

### METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS

```
const val METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS: String
```

Metadata key used to request elevated frequency of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)`s when the watch face is visible and non-ambient.

To do this `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` should include a `meta-data` tag with this name in its manifest entry. The value of this tag is the number of milliseconds the complication data source would like to elapse between `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)`s requests when the watch face is visible and non-ambient.

Note in addition to this meta-data, the data source must also request the privileged permission com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE.

Note that update requests are not guaranteed to be sent with this frequency and a lower limit exists (initially 1 second).

### METADATA_KEY_SAFE_WATCH_FACES

```
const val METADATA_KEY_SAFE_WATCH_FACES: String
```

Metadata key used to declare a list of watch faces that may receive data from a complication data source before they are granted the RECEIVE_COMPLICATION_DATA permission. This allows the listed watch faces to set the complication data source as a default and have the complication populate when the watch face is first seen.

Only trusted watch faces that will set this complication data source as a default should be included in this list.

Note that if a watch face is in the same app package as the complication data source, it does not need to be added to this list.

The value of this tag should be a comma separated list of watch faces or packages. An entry can be a flattened component, as if `https://developer.android.com/reference/android/content/ComponentName.html#flattenToString()` had been called, to declare a specific watch face as safe. An entry can also be a package name, as if `https://developer.android.com/reference/android/content/ComponentName.html#getPackageName()` had been called, in which case any watch face under the app with that package name will be considered safe for this complication data source.

From Android T, if this provider has the privileged permission `com.google.wear.permission.GET_IS_FOR_SAFE_WATCH_FACE`, then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest#isForSafeWatchFace()` will be populated.

### METADATA_KEY_SAFE_WATCH_FACE_SUPPORTED_TYPES

```
const val METADATA_KEY_SAFE_WATCH_FACE_SUPPORTED_TYPES: String
```

Metadata key used to declare supported complication types for safe watch faces.

Gated behind the privileged permission \`com.google.wear.permission.GET_IS_FOR_SAFE_WATCH_FACE', this overrides the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_SUPPORTED_TYPES()` list for 'safe' watch faces. I.e. watch faces in the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_SAFE_WATCH_FACES()` metadata list.

This means for example trusted watch faces could receive `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT` and untrusted ones `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType#MONOCHROMATIC_IMAGE`.

### METADATA_KEY_SUPPORTED_TYPES

```
const val METADATA_KEY_SUPPORTED_TYPES: String
```

Metadata key used to declare supported complication types.

A `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` must include a `meta-data` tag with this name in its manifest entry. The value of this tag should be a comma separated list of types supported by the complication data source. Types should be given as named as per the type fields in the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData`, but omitting the "TYPE_" prefix, e.g. `SHORT_TEXT`, `LONG_TEXT`, `RANGED_VALUE`.

The order of types in `METADATA_KEY_SUPPORTED_TYPES` has no significance. During complication data source selection, each item in the complication slot's supported types is checked against entries in the data source's `METADATA_KEY_SUPPORTED_TYPES` and the first matching entry from the slot's support types (if any) is chosen. If there are no matches then this data source is not eligible to be selected in that slot.

For example, a complication data source that supports the RANGED_VALUE, SHORT_TEXT, and ICON type would include the following in its manifest entry:

```kotlin
<meta-data
    android:name="android.support.wearable.complications.SUPPORTED_TYPES"
    android:value="RANGED_VALUE,SHORT_TEXT,ICON" />
```

### METADATA_KEY_UPDATE_PERIOD_SECONDS

```
const val METADATA_KEY_UPDATE_PERIOD_SECONDS: String
```

Metadata key used to declare the requested frequency of update requests.

A `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` should include a `meta-data` tag with this name in its manifest entry. The value of this tag is the number of seconds the complication data source would like to elapse between update requests.

Note that update requests are not guaranteed to be sent with this frequency.

If a complication data source never needs to receive update requests beyond the one sent when a complication is activated, the value of this tag should be 0.

For example, a complication data source that would like to update every ten minutes should include the following in its manifest entry:

```kotlin
<meta-data
    android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
    android:value="600" />
```

## Public constructors

### ComplicationDataSourceService

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
ComplicationDataSourceService()
```

## Public functions

### getPreviewData

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
abstract fun getPreviewData(type: ComplicationType): ComplicationData?
```

A request for representative preview data for the complication, for use in the editor UI. Preview data is assumed to be static per type. E.g. for a complication that displays the date and time of an event, rather than returning the real time it should return a fixed date and time such as 10:10 Aug 1st. This data may be cached by the system and the result should be constant based on the current locale.

This will be called on a background thread.

| Parameters |
|---|---|
| `type: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType` | The type of complication preview data requested. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData?` | Preview data for the given complication type. |

### onBind

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
final fun onBind(intent: Intent): IBinder?
```

### onComplicationActivated

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
@MainThread
open fun onComplicationActivated(
    complicationInstanceId: Int,
    type: ComplicationType
): Unit
```

Called when a complication is activated.

This occurs when the watch face calls setActiveComplications, or when this data source is chosen for a complication which is already active.

This will usually be followed by a call to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)`.

This will be called on the main thread.

| Parameters |
|---|---|
| `complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The system's ID for the complication. Note this ID is distinct from the complication slot used by the watch face itself. |
| `type: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType` of the activated slot. |

### onComplicationDeactivated

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
@MainThread
open fun onComplicationDeactivated(complicationInstanceId: Int): Unit
```

Called when a complication is deactivated.

This occurs when the current watch face changes, or when the watch face calls setActiveComplications and does not include the given complication (usually because the watch face has stopped displaying it).

This will be called on the main thread.

| Parameters |
|---|---|
| `complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The system's ID for the complication. Note this ID is distinct from the complication slot used by the watch face itself. |

### onComplicationRequest

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
@MainThread
abstract fun onComplicationRequest(
    request: ComplicationRequest,
    listener: ComplicationDataSourceService.ComplicationRequestListener
): Unit
```

Called when a complication data update is requested for the given complication id.

In response to this request the result callback should be called with the data to be displayed. If the request can not be fulfilled or no update is needed then null should be passed to the callback.

The callback doesn't have be called within onComplicationRequest but it should be called soon after. If this does not occur within around 20 seconds (exact timeout length subject to change), then the system will unbind from this service which may cause your eventual update to not be received. However if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest#immediateResponseRequired()` is `true` then provider should try to deliver the response in under 100 milliseconds, if `false` the deadline is 20 seconds. `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest#immediateResponseRequired()` will only ever be `true` if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS()` is present in the manifest, and the provider has the privileged permission `com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE`, and the complication is visible and non-ambient.

| Parameters |
|---|---|
| `request: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest` | The details about the complication that has been requested. |
| `listener: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.ComplicationRequestListener` | The callback to pass the result to the system. |

### onStartImmediateComplicationRequests

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

```
@MainThread
open fun onStartImmediateComplicationRequests(complicationInstanceId: Int): Unit
```

If a metadata key with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS()` is present in the manifest, and the provider has privileged permission `com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE`, then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStartImmediateComplicationRequests(kotlin.Int)` will be called when the watch face is visible and non-ambient. A series of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)`s will follow where `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest#immediateResponseRequired()` is `true`, ending with a call to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStopImmediateComplicationRequests(kotlin.Int)`.

| Parameters |
|---|---|
| `complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The system's ID for the complication. Note this ID is distinct from the complication slot used by the watch face itself. |

### onStopImmediateComplicationRequests

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

```
@MainThread
open fun onStopImmediateComplicationRequests(complicationInstanceId: Int): Unit
```

If a metadata key with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#METADATA_KEY_IMMEDIATE_UPDATE_PERIOD_MILLISECONDS()` is present in the manifest, and the provider has privileged permission `com.google.android.wearable.permission.USE_IMMEDIATE_COMPLICATION_UPDATE`, then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onStartImmediateComplicationRequests(kotlin.Int)` will be called when the watch face ceases to be visible and non-ambient. No subsequent calls to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest,androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener)` where `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/ComplicationRequest#immediateResponseRequired()` is `true` will be made unless the complication becomes visible and non-ambient again.

| Parameters |
|---|---|
| `complicationInstanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The system's ID for the complication. Note this ID is distinct from the complication slot used by the watch face itself. |