# MediaBrowserServiceCompat

Artifact: [androidx.media:media](https://developer.android.com/jetpack/androidx/releases/media) [View Source](https://cs.android.com/search?q=file:androidx/media/MediaBrowserServiceCompat.java+class:androidx.media.MediaBrowserServiceCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

*** ** * ** ***


```
public abstract class MediaBrowserServiceCompat extends Service
```

<br />

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

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> androidx.media is deprecated. Please migrate to [androidx.media3](https://developer.android.com/media/media3).

Base class for media browse services.

Media browse services enable applications to browse media content provided by an application and ask the application to start playing it. They may also be used to control content that is already playing by way of a `https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat`. To extend this class, you must declare the service in your manifest file with an intent filter with the `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#SERVICE_INTERFACE()` action.

For example:

```
<service android:name=".MyMediaBrowserServiceCompat"
         android:label="@string/service_name" >
    <intent-filter>
        <action android:name="android.media.browse.MediaBrowserService" />
    </intent-filter>
</service>
```

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot` **This class is deprecated.** androidx.media is deprecated. <br /> |
| `public class https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<T>` **This class is deprecated.** androidx.media is deprecated. <br /> |

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#SERVICE_INTERFACE() = "android.media.browse.MediaBrowserService"` **This field is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[MediaBrowserServiceCompat](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#MediaBrowserServiceCompat())()` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `void` | `[dump](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#dump(java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[]))(https://developer.android.com/reference/java/io/FileDescriptor.html fd, https://developer.android.com/reference/java/io/PrintWriter.html writer, String[] args)` **This method is deprecated.** Deprecated in Java |
| `final https://developer.android.com/reference/android/os/Bundle.html` | `[getBrowserRootHints](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#getBrowserRootHints())()` **This method is deprecated.** Deprecated in Java |
| `final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaSessionManager.RemoteUserInfo` | `[getCurrentBrowserInfo](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#getCurrentBrowserInfo())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token` | `[getSessionToken](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#getSessionToken())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[notifyChildrenChanged](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#notifyChildrenChanged(java.lang.String))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId)` **This method is deprecated.** Deprecated in Java |
| `void` | `[notifyChildrenChanged](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#notifyChildrenChanged(java.lang.String,android.os.Bundle))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html options)` **This method is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/android/os/IBinder.html` | `[onBind](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onBind(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onCreate](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onCreate())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[onCustomAction](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onCustomAction(java.lang.String,android.os.Bundle,androidx.media.MediaBrowserServiceCompat.Result<android.os.Bundle>))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html action, https://developer.android.com/reference/android/os/Bundle.html extras, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/android/os/Bundle.html> result )` **This method is deprecated.** Deprecated in Java |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper @https://developer.android.com/reference/androidx/annotation/MainThread [onDestroy](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onDestroy())()` **This method is deprecated.** Deprecated in Java |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot` | `[onGetRoot](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onGetRoot(java.lang.String,int,android.os.Bundle))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html clientPackageName, int clientUid, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html rootHints )` **This method is deprecated.** Deprecated in Java |
| `abstract void` | `[onLoadChildren](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadChildren(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem>> result )` **This method is deprecated.** Deprecated in Java |
| `void` | `[onLoadChildren](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadChildren(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>,android.os.Bundle))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem>> result, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html options )` **This method is deprecated.** Deprecated in Java |
| `void` | `[onLoadItem](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadItem(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem>))( https://developer.android.com/reference/java/lang/String.html itemId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem> result )` **This method is deprecated.** Deprecated in Java |
| `void` | `[onSearch](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onSearch(java.lang.String,android.os.Bundle,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html query, https://developer.android.com/reference/android/os/Bundle.html extras, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem>> result )` **This method is deprecated.** Deprecated in Java |
| `void` | `[setSessionToken](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token))(https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token token)` **This method is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html) `static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND = 40`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE = 80`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE = 60`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL = 15`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW = 10`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE = 5`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN = 20`

**This field is deprecated.** Deprecated in Java
From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ACCESSIBILITY_SERVICE = "accessibility"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ACCOUNT_SERVICE = "account"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ACTIVITY_SERVICE = "activity"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ADVANCED_PROTECTION_SERVICE = "advanced_protection"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ALARM_SERVICE = "alarm"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APPWIDGET_SERVICE = "appwidget"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APP_FUNCTION_SERVICE = "app_function"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APP_OPS_SERVICE = "appops"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APP_SEARCH_SERVICE = "app_search"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#AUDIO_SERVICE = "audio"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#AUTOFILL_SERVICE = "autofill"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BATTERY_SERVICE = "batterymanager"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ABOVE_CLIENT = 8`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ADJUST_WITH_ACTIVITY = 128`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ALLOW_ACTIVITY_STARTS = 512`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ALLOW_OOM_MANAGEMENT = 16`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_AUTO_CREATE = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_DEBUG_UNBIND = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_EXTERNAL_SERVICE = -2147483648`

**This field is deprecated.** Deprecated in Java
`static final long` `https://developer.android.com/reference/android/content/Context.html#BIND_EXTERNAL_SERVICE_LONG = 4611686018427387904`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_IMPORTANT = 64`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_INCLUDE_CAPABILITIES = 4096`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_NOT_FOREGROUND = 4`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_NOT_PERCEPTIBLE = 256`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_PACKAGE_ISOLATED_PROCESS = 16384`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_SHARED_ISOLATED_PROCESS = 8192`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_WAIVE_PRIORITY = 32`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BIOMETRIC_SERVICE = "biometric"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BLOB_STORE_SERVICE = "blob_store"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BLUETOOTH_SERVICE = "bluetooth"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BUGREPORT_SERVICE = "bugreport"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CAMERA_SERVICE = "camera"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CAPTIONING_SERVICE = "captioning"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CARRIER_CONFIG_SERVICE = "carrier_config"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CHOOSER_SERVICE = "chooser"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CLIPBOARD_SERVICE = "clipboard"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#COMPANION_DEVICE_SERVICE = "companiondevice"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONNECTIVITY_DIAGNOSTICS_SERVICE = "connectivity_diagnostics"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONNECTIVITY_SERVICE = "connectivity"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONSUMER_IR_SERVICE = "consumer_ir"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONTACT_KEYS_SERVICE = "contact_keys"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_IGNORE_SECURITY = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_INCLUDE_CODE = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_RESTRICTED = 4`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CREDENTIAL_SERVICE = "credential"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CROSS_PROFILE_APPS_SERVICE = "crossprofileapps"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#DEVICE_ID_DEFAULT = 0`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#DEVICE_ID_INVALID = -1`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DEVICE_LOCK_SERVICE = "device_lock"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DEVICE_POLICY_SERVICE = "device_policy"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DISPLAY_HASH_SERVICE = "display_hash"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DISPLAY_SERVICE = "display"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DOMAIN_VERIFICATION_SERVICE = "domain_verification"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DOWNLOAD_SERVICE = "download"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DROPBOX_SERVICE = "dropbox"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#EUICC_SERVICE = "euicc"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#FILE_INTEGRITY_SERVICE = "file_integrity"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#FILE_SERVICE = "file"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#GAME_SERVICE = "game"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#GRAMMATICAL_INFLECTION_SERVICE = "grammatical_inflection"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#HARDWARE_PROPERTIES_SERVICE = "hardware_properties"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#HEALTHCONNECT_SERVICE = "healthconnect"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#INPUT_METHOD_SERVICE = "input_method"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#INPUT_SERVICE = "input"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#IPSEC_SERVICE = "ipsec"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#JOB_SCHEDULER_SERVICE = "jobscheduler"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#KEYGUARD_SERVICE = "keyguard"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#KEYSTORE_SERVICE = "keystore"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LAUNCHER_APPS_SERVICE = "launcherapps"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LAYOUT_INFLATER_SERVICE = "layout_inflater"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LOCALE_SERVICE = "locale"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LOCATION_SERVICE = "location"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_COMMUNICATION_SERVICE = "media_communication"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_METRICS_SERVICE = "media_metrics"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_PROJECTION_SERVICE = "media_projection"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_QUALITY_SERVICE = "media_quality"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_ROUTER_SERVICE = "media_router"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_SESSION_SERVICE = "media_session"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MIDI_SERVICE = "midi"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_APPEND = 32768`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_ENABLE_WRITE_AHEAD_LOGGING = 8`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_MULTI_PROCESS = 4`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_NO_LOCALIZED_COLLATORS = 16`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_PRIVATE = 0`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE = 1`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_WRITEABLE = 2`

**This field is deprecated.**
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NETWORK_STATS_SERVICE = "netstats"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NFC_SERVICE = "nfc"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NOTIFICATION_SERVICE = "notification"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NPU_SERVICE = "npu"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NSD_SERVICE = "servicediscovery"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#OVERLAY_SERVICE = "overlay"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PCC_SANDBOX_SERVICE = "pcc_sandbox"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PEOPLE_SERVICE = "people"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PERFORMANCE_HINT_SERVICE = "performance_hint"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#POWER_SERVICE = "power"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PRINT_SERVICE = "print"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PROFILING_SERVICE = "profiling"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_EXPORTED = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_NOT_EXPORTED = 4`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_VISIBLE_TO_INSTANT_APPS = 1`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#RESTRICTIONS_SERVICE = "restrictions"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ROLE_SERVICE = "role"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SATELLITE_SERVICE = "satellite"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SEARCH_SERVICE = "search"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SECURITY_STATE_SERVICE = "security_state"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SENSOR_SERVICE = "sensor"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SERIAL_SERVICE = "serial"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SHORTCUT_SERVICE = "shortcut"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#STATUS_BAR_SERVICE = "statusbar"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#STORAGE_SERVICE = "storage"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#STORAGE_STATS_SERVICE = "storagestats"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SYSTEM_HEALTH_SERVICE = "systemhealth"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELECOM_SERVICE = "telecom"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_IMS_SERVICE = "telephony_ims"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_PHONE_NUMBER_SERVICE = "telephony_phone_number"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_SERVICE = "phone"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_SUBSCRIPTION_SERVICE = "telephony_subscription_service"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TETHERING_SERVICE = "tethering"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TEXT_CLASSIFICATION_SERVICE = "textclassification"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TEXT_SERVICES_MANAGER_SERVICE = "textservices"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TV_AD_SERVICE = "tv_ad"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TV_INPUT_SERVICE = "tv_input"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TV_INTERACTIVE_APP_SERVICE = "tv_interactive_app"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#UI_MODE_SERVICE = "uimode"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#USAGE_STATS_SERVICE = "usagestats"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#USB_SERVICE = "usb"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#USER_SERVICE = "user"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VIBRATOR_MANAGER_SERVICE = "vibrator_manager"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VIBRATOR_SERVICE = "vibrator"`

**This field is deprecated.**
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VIRTUAL_DEVICE_SERVICE = "virtualdevice"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VPN_MANAGEMENT_SERVICE = "vpn_management"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WALLPAPER_SERVICE = "wallpaper"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WEB_APP_SERVICE = "web_app"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_AWARE_SERVICE = "wifiaware"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_P2P_SERVICE = "wifip2p"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_RTT_RANGING_SERVICE = "wifirtt"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_SERVICE = "wifi"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WINDOW_SERVICE = "window"`

**This field is deprecated.** Deprecated in Java
From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `static final int` `https://developer.android.com/reference/android/app/Service.html#START_CONTINUATION_MASK = 15`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_FLAG_REDELIVERY = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_FLAG_RETRY = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_NOT_STICKY = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_REDELIVER_INTENT = 3`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_STICKY = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_STICKY_COMPATIBILITY = 0`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#STOP_FOREGROUND_DETACH = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#STOP_FOREGROUND_LEGACY = 0`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/app/Service.html#STOP_FOREGROUND_REMOVE = 1`

**This field is deprecated.** Deprecated in Java

### Inherited methods

From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `final int` `[getColor](https://developer.android.com/reference/android/content/Context.html#getColor(int))(int id)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/content/res/ColorStateList.html` `[getColorStateList](https://developer.android.com/reference/android/content/Context.html#getColorStateList(int))(int id)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getDrawable](https://developer.android.com/reference/android/content/Context.html#getDrawable(int))(int id)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/java/lang/String.html` `[getString](https://developer.android.com/reference/android/content/Context.html#getString(int))(int resId)`

**This method is deprecated.** Deprecated in Java
`final T` `<T> [getSystemService](https://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.Class&lt;T&gt;))(https://developer.android.com/reference/java/lang/Class.html<T> serviceClass)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/java/lang/CharSequence.html` `[getText](https://developer.android.com/reference/android/content/Context.html#getText(int))(int resId)`

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

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/content/res/TypedArray.html` `[obtainStyledAttributes](https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[]))(https://developer.android.com/reference/android/util/AttributeSet.html set, int[] attrs)`

**This method is deprecated.** Deprecated in Java
`void` `[revokeSelfPermissionOnKill](https://developer.android.com/reference/android/content/Context.html#revokeSelfPermissionOnKill(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permName)`

**This method is deprecated.** Deprecated in Java
`void` `[sendBroadcastWithMultiplePermissions](https://developer.android.com/reference/android/content/Context.html#sendBroadcastWithMultiplePermissions(android.content.Intent, java.lang.String[]))(
https://developer.android.com/reference/android/content/Intent.html intent,
String[] receiverPermissions
)`

**This method is deprecated.** Deprecated in Java
From [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) `boolean` `[bindIsolatedService](https://developer.android.com/reference/android/content/ContextWrapper.html#bindIsolatedService(android.content.Intent, int, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection))(
https://developer.android.com/reference/android/content/Intent.html service,
int flags,
https://developer.android.com/reference/java/lang/String.html instanceName,
https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
https://developer.android.com/reference/android/content/ServiceConnection.html conn
)`

**This method is deprecated.** Deprecated in Java
`boolean` `[bindService](https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.Context.BindServiceFlags, java.util.concurrent.Executor, android.content.ServiceConnection))(
https://developer.android.com/reference/android/content/Intent.html service,
https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
https://developer.android.com/reference/android/content/ServiceConnection.html conn
)`

**This method is deprecated.** Deprecated in Java
`boolean` `[bindServiceAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags, android.os.UserHandle))(
https://developer.android.com/reference/android/content/Intent.html service,
https://developer.android.com/reference/android/content/ServiceConnection.html conn,
https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
https://developer.android.com/reference/android/os/UserHandle.html user
)`

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

**This method is deprecated.** Deprecated in Java
`int` `[checkCallingOrSelfUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermission(android.net.Uri, int))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int[]` `[checkCallingOrSelfUriPermissions](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermissions(java.util.List&lt;android.net.Uri&gt;, int))(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/net/Uri.html> uris, int modeFlags)`

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

**This method is deprecated.** Deprecated in Java
`int` `[checkCallingUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermission(android.net.Uri, int))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int[]` `[checkCallingUriPermissions](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermissions(java.util.List&lt;android.net.Uri&gt;, int))(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/net/Uri.html> uris, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int` `[checkContentUriPermissionFull](https://developer.android.com/reference/android/content/ContextWrapper.html#checkContentUriPermissionFull(android.net.Uri, int, int, int))(https://developer.android.com/reference/android/net/Uri.html uri, int pid, int uid, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int` `[checkPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkPermission(java.lang.String, int, int))(https://developer.android.com/reference/java/lang/String.html permission, int pid, int uid)`

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

**This method is deprecated.** Deprecated in Java
`int` `[checkUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, int, int, int))(https://developer.android.com/reference/android/net/Uri.html uri, int pid, int uid, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int[]` `[checkUriPermissions](https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermissions(java.util.List&lt;android.net.Uri&gt;, int, int, int))(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/net/Uri.html> uris, int pid, int uid, int modeFlags)`

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

**This method is deprecated.**
`https://developer.android.com/reference/android/content/Context.html` `[createAttributionContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createAttributionContext(java.lang.String))(https://developer.android.com/reference/java/lang/String.html attributionTag)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createConfigurationContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createConfigurationContext(android.content.res.Configuration))(https://developer.android.com/reference/android/content/res/Configuration.html overrideConfiguration)`

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createContextForSplit](https://developer.android.com/reference/android/content/ContextWrapper.html#createContextForSplit(java.lang.String))(https://developer.android.com/reference/java/lang/String.html splitName)`

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

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createDisplayContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createDisplayContext(android.view.Display))(https://developer.android.com/reference/android/view/Display.html display)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createPackageContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createPackageContext(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html packageName, int flags)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createWindowContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(android.view.Display, int, android.os.Bundle))(https://developer.android.com/reference/android/view/Display.html display, int type, https://developer.android.com/reference/android/os/Bundle.html options)`

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

**This method is deprecated.** Deprecated in Java
`boolean` `[deleteDatabase](https://developer.android.com/reference/android/content/ContextWrapper.html#deleteDatabase(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`boolean` `[deleteFile](https://developer.android.com/reference/android/content/ContextWrapper.html#deleteFile(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`boolean` `[deleteSharedPreferences](https://developer.android.com/reference/android/content/ContextWrapper.html#deleteSharedPreferences(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceCallingOrSelfPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission, https://developer.android.com/reference/java/lang/String.html message)`

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

**This method is deprecated.** Deprecated in Java
`void` `[enforceCallingPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingPermission(java.lang.String, java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission, https://developer.android.com/reference/java/lang/String.html message)`

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

**This method is deprecated.** Deprecated in Java
`void` `[enforcePermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforcePermission(java.lang.String, int, int, java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission, int pid, int uid, https://developer.android.com/reference/java/lang/String.html message)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String))(
https://developer.android.com/reference/android/net/Uri.html uri,
int pid,
int uid,
int modeFlags,
https://developer.android.com/reference/java/lang/String.html message
)`

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

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

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

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

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

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

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

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

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

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

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

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getDatabasePath](https://developer.android.com/reference/android/content/ContextWrapper.html#getDatabasePath(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getDir(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html name, int mode)`

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

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

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getExternalFilesDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDir(java.lang.String))(https://developer.android.com/reference/java/lang/String.html type)`

**This method is deprecated.** Deprecated in Java
`File[]` `[getExternalFilesDirs](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDirs(java.lang.String))(https://developer.android.com/reference/java/lang/String.html type)`

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

**This method is deprecated.**
`https://developer.android.com/reference/java/io/File.html` `[getFileStreamPath](https://developer.android.com/reference/android/content/ContextWrapper.html#getFileStreamPath(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/util/concurrent/Executor.html` `[getMainExecutor](https://developer.android.com/reference/android/content/ContextWrapper.html#getMainExecutor())()`

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

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

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

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

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

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

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

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

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

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

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

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/SharedPreferences.html` `[getSharedPreferences](https://developer.android.com/reference/android/content/ContextWrapper.html#getSharedPreferences(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html name, int mode)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/Object.html` `[getSystemService](https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemService(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getSystemServiceName](https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemServiceName(java.lang.Class&lt;?&gt;))(https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> serviceClass)`

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

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

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

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

**This method is deprecated.**
`void` `[grantUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#grantUriPermission(java.lang.String, android.net.Uri, int))(https://developer.android.com/reference/java/lang/String.html toPackage, https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

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

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

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

**This method is deprecated.** Deprecated in Java
`boolean` `[moveDatabaseFrom](https://developer.android.com/reference/android/content/ContextWrapper.html#moveDatabaseFrom(android.content.Context, java.lang.String))(https://developer.android.com/reference/android/content/Context.html sourceContext, https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`boolean` `[moveSharedPreferencesFrom](https://developer.android.com/reference/android/content/ContextWrapper.html#moveSharedPreferencesFrom(android.content.Context, java.lang.String))(https://developer.android.com/reference/android/content/Context.html sourceContext, https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/FileInputStream.html` `[openFileInput](https://developer.android.com/reference/android/content/ContextWrapper.html#openFileInput(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/FileOutputStream.html` `[openFileOutput](https://developer.android.com/reference/android/content/ContextWrapper.html#openFileOutput(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html name, int mode)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html` `[openOrCreateDatabase](https://developer.android.com/reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory))(
https://developer.android.com/reference/java/lang/String.html name,
int mode,
https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html factory
)`

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

**This method is deprecated.**
`void` `[rebindService](https://developer.android.com/reference/android/content/ContextWrapper.html#rebindService(android.content.ServiceConnection, android.content.Context.BindServiceFlags))(https://developer.android.com/reference/android/content/ServiceConnection.html conn, https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags)`

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

**This method is deprecated.** Deprecated in Java
`void` `[registerDeviceIdChangeListener](https://developer.android.com/reference/android/content/ContextWrapper.html#registerDeviceIdChangeListener(java.util.concurrent.Executor, java.util.function.IntConsumer))(https://developer.android.com/reference/java/util/concurrent/Executor.html executor, https://developer.android.com/reference/java/util/function/IntConsumer.html listener)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Intent.html` `[registerReceiver](https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter))(https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver, https://developer.android.com/reference/android/content/IntentFilter.html filter)`

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

**This method is deprecated.**
`void` `[removeStickyBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle))(https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/UserHandle.html user)`

**This method is deprecated.**
`void` `[revokeSelfPermissionsOnKill](https://developer.android.com/reference/android/content/ContextWrapper.html#revokeSelfPermissionsOnKill(java.util.Collection&lt;java.lang.String&gt;))(https://developer.android.com/reference/java/util/Collection.html<https://developer.android.com/reference/java/lang/String.html> permissions)`

**This method is deprecated.** Deprecated in Java
`void` `[revokeUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(android.net.Uri, int))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

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

**This method is deprecated.** Deprecated in Java
`void` `[sendBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle))(https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/UserHandle.html user)`

**This method is deprecated.** Deprecated in Java
`void` `[sendOrderedBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, int, java.lang.String, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, java.lang.String, android.os.Bundle, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
int initialCode,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/java/lang/String.html receiverAppOp,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras,
https://developer.android.com/reference/android/os/Bundle.html options
)`

**This method is deprecated.** Deprecated in Java
`void` `[sendOrderedBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)`

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

**This method is deprecated.**
`void` `[sendStickyBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle))(https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/UserHandle.html user)`

**This method is deprecated.**
`void` `[sendStickyOrderedBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)`

**This method is deprecated.**
`void` `[sendStickyOrderedBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)`

**This method is deprecated.**
`void` `[setTheme](https://developer.android.com/reference/android/content/ContextWrapper.html#setTheme(int))(int resid)`

**This method is deprecated.** Deprecated in Java
`void` `[setWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(android.graphics.Bitmap))(https://developer.android.com/reference/android/graphics/Bitmap.html bitmap)`

**This method is deprecated.**
`void` `[startActivities](https://developer.android.com/reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[]))(Intent[] intents)`

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

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

**This method is deprecated.** Deprecated in Java
`boolean` `[startInstrumentation](https://developer.android.com/reference/android/content/ContextWrapper.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/ComponentName.html className,
https://developer.android.com/reference/java/lang/String.html profileFile,
https://developer.android.com/reference/android/os/Bundle.html arguments
)`

**This method is deprecated.** Deprecated in Java
`void` `[startIntentSender](https://developer.android.com/reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int))(
https://developer.android.com/reference/android/content/IntentSender.html intent,
https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags
)`

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

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

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

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

**This method is deprecated.** Deprecated in Java
`void` `[unregisterDeviceIdChangeListener](https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterDeviceIdChangeListener(java.util.function.IntConsumer))(https://developer.android.com/reference/java/util/function/IntConsumer.html listener)`

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

**This method is deprecated.** Deprecated in Java
`void` `[updateServiceBindings](https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceBindings(java.util.Collection&lt;android.content.Context.UpdateBindingParams&gt;))(https://developer.android.com/reference/java/util/Collection.html<https://developer.android.com/reference/android/content/Context.UpdateBindingParams.html> params)`

**This method is deprecated.** Deprecated in Java
`void` `[updateServiceGroup](https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceGroup(android.content.ServiceConnection, int, int))(https://developer.android.com/reference/android/content/ServiceConnection.html conn, int group, int importance)`

**This method is deprecated.** Deprecated in Java
From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `void` `[attachBaseContext](https://developer.android.com/reference/android/app/Service.html#attachBaseContext(android.content.Context))(https://developer.android.com/reference/android/content/Context.html newBase)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/app/Application.html` `[getApplication](https://developer.android.com/reference/android/app/Service.html#getApplication())()`

**This method is deprecated.** Deprecated in Java
`final int` `[getForegroundServiceType](https://developer.android.com/reference/android/app/Service.html#getForegroundServiceType())()`

**This method is deprecated.** Deprecated in Java
`void` `[onConfigurationChanged](https://developer.android.com/reference/android/app/Service.html#onConfigurationChanged(android.content.res.Configuration))(https://developer.android.com/reference/android/content/res/Configuration.html newConfig)`

**This method is deprecated.** Deprecated in Java
`void` `[onLowMemory](https://developer.android.com/reference/android/app/Service.html#onLowMemory())()`

**This method is deprecated.**
`void` `[onRebind](https://developer.android.com/reference/android/app/Service.html#onRebind(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.** Deprecated in Java
`void` `[onStart](https://developer.android.com/reference/android/app/Service.html#onStart(android.content.Intent, int))(https://developer.android.com/reference/android/content/Intent.html intent, int startId)`

**This method is deprecated.**
`int` `[onStartCommand](https://developer.android.com/reference/android/app/Service.html#onStartCommand(android.content.Intent, int, int))(https://developer.android.com/reference/android/content/Intent.html intent, int flags, int startId)`

**This method is deprecated.** Deprecated in Java
`void` `[onTaskRemoved](https://developer.android.com/reference/android/app/Service.html#onTaskRemoved(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html rootIntent)`

**This method is deprecated.** Deprecated in Java
`void` `[onTimeout](https://developer.android.com/reference/android/app/Service.html#onTimeout(int))(int startId)`

**This method is deprecated.** Deprecated in Java
`void` `[onTrimMemory](https://developer.android.com/reference/android/app/Service.html#onTrimMemory(int))(int level)`

**This method is deprecated.** Deprecated in Java
`boolean` `[onUnbind](https://developer.android.com/reference/android/app/Service.html#onUnbind(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.** Deprecated in Java
`final void` `[startForeground](https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification))(int id, https://developer.android.com/reference/android/app/Notification.html notification)`

**This method is deprecated.** Deprecated in Java
`final void` `[stopForeground](https://developer.android.com/reference/android/app/Service.html#stopForeground(boolean))(boolean removeNotification)`

**This method is deprecated.**
`final void` `[stopSelf](https://developer.android.com/reference/android/app/Service.html#stopSelf())()`

**This method is deprecated.** Deprecated in Java
`final boolean` `[stopSelfResult](https://developer.android.com/reference/android/app/Service.html#stopSelfResult(int))(int startId)`

**This method is deprecated.** Deprecated in Java

## Constants

### SERVICE_INTERFACE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService"
```

> [!CAUTION]
> **This field is deprecated.**   
> Deprecated in Java

The `https://developer.android.com/reference/android/content/Intent.html` that must be declared as handled by the service.

## Public constructors

### MediaBrowserServiceCompat

Added in 1.1.0 Deprecated in 1.8.0

```
public [MediaBrowserServiceCompat](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#MediaBrowserServiceCompat())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

## Public methods

### dump

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [dump](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#dump(java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[]))(FileDescriptor fd, PrintWriter writer, String[] args)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### getBrowserRootHints

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public final Bundle [getBrowserRootHints](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#getBrowserRootHints())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the root hints sent from the currently connected `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat`. The root hints are service-specific arguments included in an optional bundle sent to the media browser service when connecting and retrieving the root id for browsing, or null if none. The contents of this bundle may affect the information returned when browsing.

Note that this will return null when connected to `https://developer.android.com/reference/android/media/browse/MediaBrowser.html` and running on API 23 or lower.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | If this method is called outside of `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadChildren(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>)`, `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadItem(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem>)` or `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onSearch(java.lang.String,android.os.Bundle,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>)`. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot#EXTRA_RECENT()` |   |
| `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot#EXTRA_OFFLINE()` |   |
| `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot#EXTRA_SUGGESTED()` |   |

### getCurrentBrowserInfo

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public final @NonNull MediaSessionManager.RemoteUserInfo [getCurrentBrowserInfo](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#getCurrentBrowserInfo())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the browser information who sent the current request.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | If this method is called outside of `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onGetRoot(java.lang.String,int,android.os.Bundle)` or `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadChildren(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>)` or `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadItem(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem>)`. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media/MediaSessionManager#isTrustedForMediaControl(androidx.media.MediaSessionManager.RemoteUserInfo)` |   |

### getSessionToken

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public @Nullable MediaSessionCompat.Token [getSessionToken](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#getSessionToken())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the session token, or null if it has not yet been created or if it has been destroyed.

### notifyChildrenChanged

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [notifyChildrenChanged](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#notifyChildrenChanged(java.lang.String))(@NonNull String parentId)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Notifies all connected media browsers that the children of the specified parent id have changed in some way. This will cause browsers to fetch subscribed content again.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId` | The id of the parent media item whose children changed. |

### notifyChildrenChanged

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [notifyChildrenChanged](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#notifyChildrenChanged(java.lang.String,android.os.Bundle))(@NonNull String parentId, @NonNull Bundle options)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Notifies all connected media browsers that the children of the specified parent id have changed in some way. This will cause browsers to fetch subscribed content again.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId` | The id of the parent media item whose children changed. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html options` | A bundle of service-specific arguments to send to the media browse. The contents of this bundle may contain the information about the change. |

### onBind

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public IBinder [onBind](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onBind(android.content.Intent))(Intent intent)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onCreate

```
public void [onCreate](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onCreate())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onCustomAction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [onCustomAction](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onCustomAction(java.lang.String,android.os.Bundle,androidx.media.MediaBrowserServiceCompat.Result<android.os.Bundle>))(
    @NonNull String action,
    Bundle extras,
    @NonNull MediaBrowserServiceCompat.Result<Bundle> result
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called to request a custom action to this service.

Implementations must call either `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` or `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendError(android.os.Bundle)`. If the requested custom action will be an expensive operation `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#detach()` may be called before returning from this function, and then the service can send the result later when the custom action is completed. Implementation can also call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendProgressUpdate(android.os.Bundle)` to send an interim update to the requester.

If the requested custom action is not supported by this service, call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendError(android.os.Bundle)`. The default implementation will invoke `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendError(android.os.Bundle)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html action` | The custom action sent from the media browser. |
| `https://developer.android.com/reference/android/os/Bundle.html extras` | The bundle of service-specific arguments sent from the media browser. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/android/os/Bundle.html> result` | The `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result` to send the result of the requested custom action. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat#CUSTOM_ACTION_DOWNLOAD()` |   |
| `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat#CUSTOM_ACTION_REMOVE_DOWNLOADED_FILE()` |   |

### onDestroy

```
@CallSuper
@MainThread
public void [onDestroy](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onDestroy())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onGetRoot

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public abstract @Nullable MediaBrowserServiceCompat.BrowserRoot [onGetRoot](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onGetRoot(java.lang.String,int,android.os.Bundle))(
    @NonNull String clientPackageName,
    int clientUid,
    @Nullable Bundle rootHints
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called to get the root information for browsing by a particular client.

The implementation should verify that the client package has permission to access browse media information before returning the root id; it should return null if the client is not allowed to access this information.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html clientPackageName` | The package name of the application which is requesting access to browse media. |
| `int clientUid` | The uid of the application which is requesting access to browse media. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html rootHints` | An optional bundle of service-specific arguments to send to the media browse service when connecting and retrieving the root id for browsing, or null if none. The contents of this bundle may affect the information returned when browsing. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot` | The `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot` for accessing this app's content or null. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot#EXTRA_RECENT()` |   |
| `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot#EXTRA_OFFLINE()` |   |
| `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.BrowserRoot#EXTRA_SUGGESTED()` |   |

### onLoadChildren

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public abstract void [onLoadChildren](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadChildren(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>))(
    @NonNull String parentId,
    @NonNull MediaBrowserServiceCompat.Result<List<MediaBrowserCompat.MediaItem>> result
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called to get information about the children of a media item.

Implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with the list of children. If loading the children will be an expensive operation that should be performed on another thread, `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#detach()` may be called before returning from this function, and then `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` called when the loading is complete.

In case the media item does not have any children, call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with an empty list. When the given `parentId` is invalid, implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with `null`, which will invoke `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onError(java.lang.String)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId` | The id of the parent media item whose children are to be queried. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem>> result` | The Result to send the list of children to. |

### onLoadChildren

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [onLoadChildren](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadChildren(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>,android.os.Bundle))(
    @NonNull String parentId,
    @NonNull MediaBrowserServiceCompat.Result<List<MediaBrowserCompat.MediaItem>> result,
    @NonNull Bundle options
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called to get information about the children of a media item.

Implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with the list of children. If loading the children will be an expensive operation that should be performed on another thread, `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#detach()` may be called before returning from this function, and then `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` called when the loading is complete.

In case the media item does not have any children, call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with an empty list. When the given `parentId` is invalid, implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with `null`, which will invoke `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onError(java.lang.String)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html parentId` | The id of the parent media item whose children are to be queried. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem>> result` | The Result to send the list of children to. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html options` | A bundle of service-specific arguments sent from the media browse. The information returned through the result should be affected by the contents of this bundle. |

### onLoadItem

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [onLoadItem](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onLoadItem(java.lang.String,androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem>))(
    String itemId,
    @NonNull MediaBrowserServiceCompat.Result<MediaBrowserCompat.MediaItem> result
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called to get information about a specific media item.

Implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)`. If loading the item will be an expensive operation `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#detach()` may be called before returning from this function, and then `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` called when the item has been loaded.

When the given `itemId` is invalid, implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with `null`.

The default implementation will invoke `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ItemCallback#onError(java.lang.String)`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html itemId` | The id for the specific `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem> result` | The Result to send the item to, or null if the id is invalid. |

### onSearch

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [onSearch](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#onSearch(java.lang.String,android.os.Bundle,androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>))(
    @NonNull String query,
    Bundle extras,
    @NonNull MediaBrowserServiceCompat.Result<List<MediaBrowserCompat.MediaItem>> result
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called to get the search result.

Implementations must call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)`. If the search will be an expensive operation `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#detach()` may be called before returning from this function, and then `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` called when the search has been completed.

In case there are no search results, call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with an empty list. In case there are some errors happened, call `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result#sendResult(T)` with `null`, which will invoke `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.SearchCallback#onError(java.lang.String,android.os.Bundle)`.

The default implementation will invoke `https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.SearchCallback#onError(java.lang.String,android.os.Bundle)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html query` | The search query sent from the media browser. It contains keywords separated by space. |
| `https://developer.android.com/reference/android/os/Bundle.html extras` | The bundle of service-specific arguments sent from the media browser. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem>> result` | The `https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat.Result` to send the search result. |

### setSessionToken

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
public void [setSessionToken](https://developer.android.com/reference/androidx/media/MediaBrowserServiceCompat#setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token))(MediaSessionCompat.Token token)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Call to set the media session.

This should be called as soon as possible during the service's startup. It may only be called once.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token token` | The token for the service's `https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat`. |