# TestCarContext

Artifact: [androidx.car.app:app-testing](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/testing/TestCarContext.java+class:androidx.car.app.testing.TestCarContext) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

*** ** * ** ***

<br />

```
class TestCarContext : CarContext
```

<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) |||
|   |   | ↳ | [androidx.car.app.CarContext](https://developer.android.com/reference/kotlin/androidx/car/app/CarContext) ||
|   |   |   | ↳ | [androidx.car.app.testing.TestCarContext](https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext) |

*** ** * ** ***

The `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext` that is used for testing.

This class will return the test version of car services for tracking calls during testing.

It also allows retrieving the car services already cast to the testing class by calling `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#getCarService(java.lang.Class<T>)` with the class name of the test services:

```kotlin
testCarContext.getCarService(TestAppManager.class)
```

```kotlin
testCarContext.getCarService(TestNavigationManager.class)
```

```kotlin
testCarContext.getCarService(TestScreenManager.class)
```

Allows retrieving all `https://developer.android.com/reference/android/content/Intent.html`s sent via `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#startCarApp(android.content.Intent)`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext.PermissionRequestInfo` A representation of a permission request including the permissions that were requested as well as the callback provided. |

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#createCarContext(android.content.Context)(testContext: https://developer.android.com/reference/android/content/Context.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext` to use for testing. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#finishCarApp()()` Requests to finish the car app. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#getCarService(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Provides a car service by name. |
| `T` | `<T> https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#getCarService(java.lang.Class<T>)(serviceClass: https://developer.android.com/reference/java/lang/Class.html<T!>)` Returns a car service by class. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/testing/FakeHost` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#getFakeHost()()` Retrieve the `https://developer.android.com/reference/kotlin/androidx/car/app/testing/FakeHost` being used. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext.PermissionRequestInfo?` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#getLastPermissionRequestInfo()()` Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext.PermissionRequestInfo` including the information with the last call made to `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#requestPermissions(java.util.List<java.lang.String>,androidx.car.app.OnRequestPermissionsListener)`, or `null` if no call was made. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/android/content/Intent.html!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#getStartCarAppIntents()()` Returns all `https://developer.android.com/reference/android/content/Intent.html`s sent via `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#startCarApp(android.content.Intent)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#hasCalledFinishCarApp()()` Verifies if `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#finishCarApp()` has been called. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#requestPermissions(java.util.List<java.lang.String>,java.util.concurrent.Executor,androidx.car.app.OnRequestPermissionsListener)( permissions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>, executor: https://developer.android.com/reference/java/util/concurrent/Executor.html, listener: https://developer.android.com/reference/kotlin/androidx/car/app/OnRequestPermissionsListener )` Requests the provided `permissions` from the user. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#reset()()` Resets the values tracked by this `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#startCarApp(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` Starts a car app on the car screen. |

### Inherited Constants

From [androidx.car.app.CarContext](https://developer.android.com/reference/kotlin/androidx/car/app/CarContext) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#ACTION_NAVIGATE() = "androidx.car.app.action.NAVIGATE"`

Standard action for navigating to a location.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#APP_SERVICE() = "app"`

Manages all app events such as invalidating the UI, showing a toast, etc.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#CAR_SERVICE() = "car"`

Internal usage only.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 2)
https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#CONSTRAINT_SERVICE() = "constraints"`

Manages constraints for the app as enforced by the connected host.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#EXTRA_START_CAR_APP_BINDER_KEY() = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY"`

Key for including a IStartCarApp in the notification `https://developer.android.com/reference/android/content/Intent.html`, for starting the app if it has not been opened yet.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 3)
https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#HARDWARE_SERVICE() = "hardware"`

Manages access to androidx.car.app.hardware properties, sensors and actions.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8)
https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#MEDIA_PLAYBACK_SERVICE() = "media_playback"`

Manages the media requests from 3p apps such as providing a media session token,
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#NAVIGATION_SERVICE() = "navigation"`

Manages all navigation events such as starting navigation when focus is granted, abandoning navigation when focus is lost, etc.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#SCREEN_SERVICE() = "screen"`

Manages the screens of the app, including the screen stack.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#SUGGESTION_SERVICE() = "suggestion"`

Manages posting suggestion events
From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#ACCESSIBILITY_SERVICE = "accessibility"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#ACCOUNT_SERVICE = "account"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#ACTIVITY_SERVICE = "activity"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#ADVANCED_PROTECTION_SERVICE = "advanced_protection"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#ALARM_SERVICE = "alarm"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#APPWIDGET_SERVICE = "appwidget"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#APP_FUNCTION_SERVICE = "app_function"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#APP_OPS_SERVICE = "appops"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#APP_SEARCH_SERVICE = "app_search"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#AUDIO_SERVICE = "audio"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#AUTOFILL_SERVICE = "autofill"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#BATTERY_SERVICE = "batterymanager"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_ABOVE_CLIENT = 8` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_ADJUST_WITH_ACTIVITY = 128` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_ALLOW_ACTIVITY_STARTS = 512` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_ALLOW_OOM_MANAGEMENT = 16` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_AUTO_CREATE = 1` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_DEBUG_UNBIND = 2` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_EXTERNAL_SERVICE = -2147483648` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_EXTERNAL_SERVICE_LONG = 4611686018427387904` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_IMPORTANT = 64` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_INCLUDE_CAPABILITIES = 4096` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_NOT_FOREGROUND = 4` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_NOT_PERCEPTIBLE = 256` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_PACKAGE_ISOLATED_PROCESS = 16384` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_SHARED_ISOLATED_PROCESS = 8192` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#BIND_WAIVE_PRIORITY = 32` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#BIOMETRIC_SERVICE = "biometric"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#BLOB_STORE_SERVICE = "blob_store"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#BLUETOOTH_SERVICE = "bluetooth"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#BUGREPORT_SERVICE = "bugreport"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CAMERA_SERVICE = "camera"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CAPTIONING_SERVICE = "captioning"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CARRIER_CONFIG_SERVICE = "carrier_config"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CHOOSER_SERVICE = "chooser"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CLIPBOARD_SERVICE = "clipboard"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#COMPANION_DEVICE_SERVICE = "companiondevice"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CONNECTIVITY_DIAGNOSTICS_SERVICE = "connectivity_diagnostics"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CONNECTIVITY_SERVICE = "connectivity"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CONSUMER_IR_SERVICE = "consumer_ir"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CONTACT_KEYS_SERVICE = "contact_keys"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_IGNORE_SECURITY = 2` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_INCLUDE_CODE = 1` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_RESTRICTED = 4` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CREDENTIAL_SERVICE = "credential"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#CROSS_PROFILE_APPS_SERVICE = "crossprofileapps"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#DEVICE_ID_DEFAULT = 0` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#DEVICE_ID_INVALID = -1` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DEVICE_LOCK_SERVICE = "device_lock"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DEVICE_POLICY_SERVICE = "device_policy"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DISPLAY_HASH_SERVICE = "display_hash"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DISPLAY_SERVICE = "display"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DOMAIN_VERIFICATION_SERVICE = "domain_verification"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DOWNLOAD_SERVICE = "download"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#DROPBOX_SERVICE = "dropbox"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#EUICC_SERVICE = "euicc"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#FILE_INTEGRITY_SERVICE = "file_integrity"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#FILE_SERVICE = "file"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#GAME_SERVICE = "game"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#GRAMMATICAL_INFLECTION_SERVICE = "grammatical_inflection"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#HARDWARE_PROPERTIES_SERVICE = "hardware_properties"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#HEALTHCONNECT_SERVICE = "healthconnect"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#INPUT_METHOD_SERVICE = "input_method"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#INPUT_SERVICE = "input"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#IPSEC_SERVICE = "ipsec"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#JOB_SCHEDULER_SERVICE = "jobscheduler"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#KEYGUARD_SERVICE = "keyguard"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#KEYSTORE_SERVICE = "keystore"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#LAUNCHER_APPS_SERVICE = "launcherapps"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#LAYOUT_INFLATER_SERVICE = "layout_inflater"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#LOCALE_SERVICE = "locale"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#LOCATION_SERVICE = "location"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MEDIA_COMMUNICATION_SERVICE = "media_communication"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MEDIA_METRICS_SERVICE = "media_metrics"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MEDIA_PROJECTION_SERVICE = "media_projection"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MEDIA_QUALITY_SERVICE = "media_quality"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MEDIA_ROUTER_SERVICE = "media_router"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MEDIA_SESSION_SERVICE = "media_session"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#MIDI_SERVICE = "midi"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_APPEND = 32768` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_ENABLE_WRITE_AHEAD_LOGGING = 8` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_MULTI_PROCESS = 4`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_NO_LOCALIZED_COLLATORS = 16` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_PRIVATE = 0` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE = 1`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_WRITEABLE = 2`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#NETWORK_STATS_SERVICE = "netstats"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#NFC_SERVICE = "nfc"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#NOTIFICATION_SERVICE = "notification"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#NPU_SERVICE = "npu"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#NSD_SERVICE = "servicediscovery"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#OVERLAY_SERVICE = "overlay"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#PCC_SANDBOX_SERVICE = "pcc_sandbox"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#PEOPLE_SERVICE = "people"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#PERFORMANCE_HINT_SERVICE = "performance_hint"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#POWER_SERVICE = "power"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#PRINT_SERVICE = "print"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#PROFILING_SERVICE = "profiling"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_EXPORTED = 2` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_NOT_EXPORTED = 4` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_VISIBLE_TO_INSTANT_APPS = 1` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#RESTRICTIONS_SERVICE = "restrictions"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#ROLE_SERVICE = "role"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SATELLITE_SERVICE = "satellite"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SEARCH_SERVICE = "search"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SECURITY_STATE_SERVICE = "security_state"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SENSOR_SERVICE = "sensor"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SERIAL_SERVICE = "serial"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SHORTCUT_SERVICE = "shortcut"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#STATUS_BAR_SERVICE = "statusbar"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#STORAGE_SERVICE = "storage"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#STORAGE_STATS_SERVICE = "storagestats"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#SYSTEM_HEALTH_SERVICE = "systemhealth"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TELECOM_SERVICE = "telecom"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_IMS_SERVICE = "telephony_ims"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_PHONE_NUMBER_SERVICE = "telephony_phone_number"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_SERVICE = "phone"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_SUBSCRIPTION_SERVICE = "telephony_subscription_service"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TETHERING_SERVICE = "tethering"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TEXT_CLASSIFICATION_SERVICE = "textclassification"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TEXT_SERVICES_MANAGER_SERVICE = "textservices"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TV_AD_SERVICE = "tv_ad"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TV_INPUT_SERVICE = "tv_input"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#TV_INTERACTIVE_APP_SERVICE = "tv_interactive_app"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#UI_MODE_SERVICE = "uimode"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#USAGE_STATS_SERVICE = "usagestats"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#USB_SERVICE = "usb"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#USER_SERVICE = "user"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#VIBRATOR_MANAGER_SERVICE = "vibrator_manager"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#VIBRATOR_SERVICE = "vibrator"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#VIRTUAL_DEVICE_SERVICE = "virtualdevice"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#VPN_MANAGEMENT_SERVICE = "vpn_management"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WALLPAPER_SERVICE = "wallpaper"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WEB_APP_SERVICE = "web_app"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WIFI_AWARE_SERVICE = "wifiaware"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WIFI_P2P_SERVICE = "wifip2p"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WIFI_RTT_RANGING_SERVICE = "wifirtt"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WIFI_SERVICE = "wifi"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/Context.html#WINDOW_SERVICE = "window"`

### Inherited functions

From [androidx.car.app.CarContext](https://developer.android.com/reference/kotlin/androidx/car/app/CarContext) `https://developer.android.com/reference/android/content/ComponentName.html?` `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 2)
https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#getCallingComponent()()`

Return the component (service or activity) that invoked this car app.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#getCarAppApiLevel()()`

Retrieves the API level negotiated with the host.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#getCarServiceName(java.lang.Class<?>)(serviceClass: https://developer.android.com/reference/java/lang/Class.html<*>)`

Gets the name of the car service that is represented by the specified class.
`https://developer.android.com/reference/kotlin/androidx/car/app/HostInfo?` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#getHostInfo()()`

Returns information about the host attached to this service.
`https://developer.android.com/reference/kotlin/androidx/activity/OnBackPressedDispatcher` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#getOnBackPressedDispatcher()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/activity/OnBackPressedDispatcher` that will be triggered when the user clicks a back button.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#isDarkMode()()`

Returns `true` if the car is set to dark mode.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#requestPermissions(java.util.List<java.lang.String>,androidx.car.app.OnRequestPermissionsListener)(

permissions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>,

listener: https://developer.android.com/reference/kotlin/androidx/car/app/OnRequestPermissionsListener

)`

Requests the provided `permissions` from the user, calling the provided ` listener` in the main thread.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 2)
https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#setCarAppResult(int,android.content.Intent)(resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, data: https://developer.android.com/reference/android/content/Intent.html?)`

Sets the result of this car app.
`java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startCarApp](https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#startCarApp(android.content.Intent,android.content.Intent))(notificationIntent: https://developer.android.com/reference/android/content/Intent.html, appIntent: https://developer.android.com/reference/android/content/Intent.html)`

**This function is deprecated.**

use `https://developer.android.com/reference/kotlin/androidx/car/app/notification/CarPendingIntent#getCarApp(android.content.Context,int,android.content.Intent,int)` to create the pending intent for the notification action.

<br />

From [android.content.Context](https://developer.android.com/reference/android/content/Context.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)` `T!` `<T> 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/Context.BindServiceFlags.html!` `https://developer.android.com/reference/android/content/Context.html#getUpdateableFlags()()` `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://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/-unit/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#attachBaseContext(android.content.Context)(base: 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/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.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#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/-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/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-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/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-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/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-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()()`

**This function is deprecated.**
`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(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/-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/android/content/Context.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationContext()()` `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationInfo()()` `https://developer.android.com/reference/android/content/res/AssetManager.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAssets()()` `https://developer.android.com/reference/android/content/AttributionSource.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionSource()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionTag()()` `https://developer.android.com/reference/android/content/Context.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getBaseContext()()` `https://developer.android.com/reference/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getCacheDir()()` `https://developer.android.com/reference/java/lang/ClassLoader.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getClassLoader()()` `https://developer.android.com/reference/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getCodeCacheDir()()` `https://developer.android.com/reference/android/content/ContentResolver.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getContentResolver()()` `https://developer.android.com/reference/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDataDir()()` `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://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDeviceId()()` `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/android/view/Display.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDisplay()()` `https://developer.android.com/reference/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDir()()` `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#getExternalCacheDirs()()` `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://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#getExternalMediaDirs()()`

**This function is deprecated.**
`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/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getFilesDir()()` `https://developer.android.com/reference/java/util/concurrent/Executor.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getMainExecutor()()` `https://developer.android.com/reference/android/os/Looper.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getMainLooper()()` `https://developer.android.com/reference/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getNoBackupFilesDir()()` `https://developer.android.com/reference/java/io/File.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDir()()` `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#getObbDirs()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getOpPackageName()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageCodePath()()` `https://developer.android.com/reference/android/content/pm/PackageManager.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageManager()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageName()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageResourcePath()()` `https://developer.android.com/reference/android/content/ContextParams.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getParams()()` `https://developer.android.com/reference/android/content/res/Resources.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getResources()()` `https://developer.android.com/reference/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://developer.android.com/reference/android/content/res/Resources.Theme.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getTheme()()` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaper()()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumHeight()()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumWidth()()`

**This function is deprecated.**
`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#isDeviceProtectedStorage()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#isRestricted()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#isUiContext()()` `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/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/content/ContextWrapper.html#peekWallpaper()()`

**This function is deprecated.**
`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://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!)`

**This function is deprecated.**
`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!)`

**This function is deprecated.**
`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.collections/-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#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#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#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!)`

**This function is deprecated.**
`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!)`

**This function is deprecated.**
`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!

)`

**This function is deprecated.**
`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!

)`

**This function is deprecated.**
`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!)`

**This function is deprecated.**
`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#startActivity(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.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://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://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-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)`

## Public functions

### createCarContext

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

```
java-static fun createCarContext(testContext: Context): TestCarContext
```

Creates a `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext` to use for testing.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `testContext` is null |

### finishCarApp

```
fun finishCarApp(): Unit
```

Requests to finish the car app.

Call this when your app is done and should be closed. The `https://developer.android.com/reference/kotlin/androidx/car/app/Session` corresponding to this `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext` will become `State.DESTROYED`.

At some point after this call, the OS will destroy your `https://developer.android.com/reference/kotlin/androidx/car/app/CarAppService`.

**This method should not be called until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of the context's `https://developer.android.com/reference/kotlin/androidx/car/app/Session` is at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED`**.

### getCarService

```
fun getCarService(name: String): Any
```

Provides a car service by name.

The class of the returned object varies by the requested name.

Currently supported car services, and their respective classes, are:


`https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#APP_SERVICE()`

:
    An `https://developer.android.com/reference/kotlin/androidx/car/app/AppManager` for communication between the app and the host.


`https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#NAVIGATION_SERVICE()`

:
    A `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/NavigationManager` for management of navigation updates.


`https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#SCREEN_SERVICE()`

:
    A `https://developer.android.com/reference/kotlin/androidx/car/app/ScreenManager` for management of `https://developer.android.com/reference/kotlin/androidx/car/app/Screen`s.


`https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#CONSTRAINT_SERVICE()`

:
    A `https://developer.android.com/reference/kotlin/androidx/car/app/constraints/ConstraintManager` for management of content limits.


`https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#HARDWARE_SERVICE()`

:
    A `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/CarHardwareManager` for interacting with car hardware (e.g. sensors) data.


`https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#SUGGESTION_SERVICE()`

:
    A `https://developer.android.com/reference/kotlin/androidx/car/app/suggestion/SuggestionManager` for posting `https://developer.android.com/reference/kotlin/androidx/car/app/suggestion/model/Suggestion`s.

**This method should not be called until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of the context's `https://developer.android.com/reference/kotlin/androidx/car/app/Session` is at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED`**.

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the car service requested. This should be one of `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#APP_SERVICE()`, `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#NAVIGATION_SERVICE()` or `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#SCREEN_SERVICE()` |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | The car service instance |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `name` does not refer to a valid car service |
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if the service referred by `name` can not be instantiated (e.g. missing library dependency) |
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `name` is `null` |

### getCarService

```
fun <T> getCarService(serviceClass: Class<T!>): T
```

Returns a car service by class.

See `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#getCarService(java.lang.String)` for a list of the supported car services.

**This method should not be called until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of the context's `https://developer.android.com/reference/kotlin/androidx/car/app/Session` is at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED`**.

| Parameters |
|---|---|
| `serviceClass: https://developer.android.com/reference/java/lang/Class.html<T!>` | the class of the requested service |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `serviceClass` is not the class of a supported car service |
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if `serviceClass` can not be instantiated (e.g. missing library dependency) |
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `serviceClass` is `null` |

### getFakeHost

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

```
fun getFakeHost(): FakeHost
```

Retrieve the `https://developer.android.com/reference/kotlin/androidx/car/app/testing/FakeHost` being used.

### getLastPermissionRequestInfo

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

```
fun getLastPermissionRequestInfo(): TestCarContext.PermissionRequestInfo?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext.PermissionRequestInfo` including the information with the last call made to `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#requestPermissions(java.util.List<java.lang.String>,androidx.car.app.OnRequestPermissionsListener)`, or `null` if no call was made.

### getStartCarAppIntents

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

```
fun getStartCarAppIntents(): (Mutable)List<Intent!>
```

Returns all `https://developer.android.com/reference/android/content/Intent.html`s sent via `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#startCarApp(android.content.Intent)`.

The `https://developer.android.com/reference/android/content/Intent.html`s are stored in the order of when they were sent, where the first intent in the list, is the first intent sent.

The results will be stored until `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext#reset()` is called.

### hasCalledFinishCarApp

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

```
fun hasCalledFinishCarApp(): Boolean
```

Verifies if `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#finishCarApp()` has been called.

### requestPermissions

```
fun requestPermissions(
    permissions: (Mutable)List<String!>,
    executor: Executor,
    listener: OnRequestPermissionsListener
): Unit
```

Requests the provided `permissions` from the user.

When the result is available, the `listener` provided will be called using the `https://developer.android.com/reference/java/util/concurrent/Executor.html` provided.

This method should be called using a `https://developer.android.com/reference/kotlin/androidx/car/app/model/ParkedOnlyOnClickListener`.

If this method is called while the host deems it is unsafe (for example, when the user is driving), the permission(s) will not be requested from the user.

If the `https://developer.android.com/reference/kotlin/androidx/car/app/Session` is destroyed before the user accepts or rejects the permissions, the callback will not be executed.

#### Platform Considerations

Using this method allows the app to work across all platforms supported by the library with the same API (e.g. Android Auto on mobile devices and Android Automotive OS on native car heads unit). On a mobile platform, this method will start an activity that will display the platform's permissions UI over it. You can choose to not use this method and instead implement your own activity and code to request the permissions in that platform. On Automotive OS however, distraction-optimized activities other than `CarAppActivity` are not allowed and may be rejected during app submission. See `CarAppActivity` for more details.

| Parameters |
|---|---|
| `permissions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>` | the runtime permissions to request from the user |
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | the executor that will be used for calling the `callback` provided |
| `listener: https://developer.android.com/reference/kotlin/androidx/car/app/OnRequestPermissionsListener` | listener that will be notified when the user takes action on the permission request |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if any of `executor`, `permissions` or `callback` are `null` |

### reset

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

```
fun reset(): Unit
```

Resets the values tracked by this `https://developer.android.com/reference/kotlin/androidx/car/app/testing/TestCarContext`.

### startCarApp

```
fun startCarApp(intent: Intent): Unit
```

Starts a car app on the car screen.

The target application will get the `https://developer.android.com/reference/android/content/Intent.html` via `https://developer.android.com/reference/kotlin/androidx/car/app/Session#onCreateScreen(android.content.Intent)` or `https://developer.android.com/reference/kotlin/androidx/car/app/Session#onNewIntent(android.content.Intent)`.

Supported `https://developer.android.com/reference/android/content/Intent.html`s:


An `https://developer.android.com/reference/android/content/Intent.html` to navigate.

:
    The action must be `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#ACTION_NAVIGATE()`.
:
    The data URI scheme must be either a latitude,longitude pair, or a + separated string query as follows:
:
    1) "geo:12.345,14.8767" for a latitude, longitude pair.
:
    2) "geo:0,0?q=123+Main+St,+Seattle,+WA+98101" for an address.
:
    3) "geo:0,0?q=a+place+name" for a place to search for.


An `https://developer.android.com/reference/android/content/Intent.html` to make a phone call.

:
    The `https://developer.android.com/reference/android/content/Intent.html` must be created as defined [here](https://developer.android
    .com/guide/components/intents-common#DialPhone).


An `https://developer.android.com/reference/android/content/Intent.html` to start this app in the car.

:
    The component name of the intent must be the one for the `https://developer.android.com/reference/kotlin/androidx/car/app/CarAppService` that contains this `https://developer.android.com/reference/kotlin/androidx/car/app/CarContext`. If the component name is for a different component, the method will throw a `https://developer.android.com/reference/java/lang/SecurityException.html`.

**This method should not be called until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of the context's `https://developer.android.com/reference/kotlin/androidx/car/app/Session` is at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED`**.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the `https://developer.android.com/reference/android/content/Intent.html` to send to the target application |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException.html` | if the app attempts to start a different app explicitly or does not have permissions for the requested action |
| `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` | if the remote call fails. For example, if the intent cannot be handled by the car host. |
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `intent` is `null` |