# MediaBrowserCompat.ConnectionCallback

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-media-compat:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.ConnectionCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.ConnectionCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.ConnectionCallback#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.ConnectionCallback#)  

# MediaBrowserCompat.ConnectionCallback

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


class
MediaBrowserCompat.ConnectionCallback
`  
`

extends Object


``


`

|---|----------------------------------------------------------------|
| java.lang.Object                                                  ||
| ↳ | android.support.v4.media.MediaBrowserCompat.ConnectionCallback |

<br />

*** ** * ** ***

Callbacks for connection related events.

## Summary

|                                                                                      ### Public constructors                                                                                       ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[MediaBrowserCompat.ConnectionCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ConnectionCallback#MediaBrowserCompat.ConnectionCallback())`() ` |

|                                                                                                                                                    ### Public methods                                                                                                                                                    ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onConnected](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ConnectionCallback#onConnected())`() ` Invoked after[connect()](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat#connect())when the request has successfully completed. |
| ` void` | ` `[onConnectionFailed](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ConnectionCallback#onConnectionFailed())`() ` Invoked when the connection to the media browser failed.                                                                                              |
| ` void` | ` `[onConnectionSuspended](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ConnectionCallback#onConnectionSuspended())`() ` Invoked when the client is disconnected from the media browser.                                                                                 |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.ConnectionCallback#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public constructors

### MediaBrowserCompat.ConnectionCallback

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
MediaBrowserCompat.ConnectionCallback ()
```

<br />

<br />

## Public methods

### onConnected

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onConnected ()
```

Invoked after[connect()](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat#connect())when the request has successfully completed.

<br />

### onConnectionFailed

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onConnectionFailed ()
```

Invoked when the connection to the media browser failed.

<br />

### onConnectionSuspended

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onConnectionSuspended ()
```

Invoked when the client is disconnected from the media browser.

<br />

-

  ## Classes

  - [AudioAttributesCompat](https://developer.android.com/reference/android/support/v4/media/AudioAttributesCompat)
  - [AudioAttributesCompat.Builder](https://developer.android.com/reference/android/support/v4/media/AudioAttributesCompat.Builder)
  - [MediaBrowserCompat](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat)
  - [MediaBrowserCompat.ConnectionCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ConnectionCallback)
  - [MediaBrowserCompat.CustomActionCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback)
  - [MediaBrowserCompat.ItemCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.ItemCallback)
  - [MediaBrowserCompat.MediaItem](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.MediaItem)
  - [MediaBrowserCompat.SearchCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.SearchCallback)
  - [MediaBrowserCompat.SubscriptionCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback)
  - [MediaBrowserServiceCompat](https://developer.android.com/reference/android/support/v4/media/MediaBrowserServiceCompat)
  - [MediaBrowserServiceCompat.BrowserRoot](https://developer.android.com/reference/android/support/v4/media/MediaBrowserServiceCompat.BrowserRoot)
  - [MediaBrowserServiceCompat.Result](https://developer.android.com/reference/android/support/v4/media/MediaBrowserServiceCompat.Result)
  - [MediaDescriptionCompat](https://developer.android.com/reference/android/support/v4/media/MediaDescriptionCompat)
  - [MediaDescriptionCompat.Builder](https://developer.android.com/reference/android/support/v4/media/MediaDescriptionCompat.Builder)
  - [MediaMetadataCompat](https://developer.android.com/reference/android/support/v4/media/MediaMetadataCompat)
  - [MediaMetadataCompat.Builder](https://developer.android.com/reference/android/support/v4/media/MediaMetadataCompat.Builder)
  - [RatingCompat](https://developer.android.com/reference/android/support/v4/media/RatingCompat)
  - [VolumeProviderCompat](https://developer.android.com/reference/android/support/v4/media/VolumeProviderCompat)
  - [VolumeProviderCompat.Callback](https://developer.android.com/reference/android/support/v4/media/VolumeProviderCompat.Callback)