# MediaBrowserCompat.CustomActionCallback

added in[version 25.4.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.CustomActionCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.CustomActionCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.CustomActionCallback#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.CustomActionCallback#)  

# MediaBrowserCompat.CustomActionCallback

| 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

abstract
class
MediaBrowserCompat.CustomActionCallback
`  
`

extends Object


``


`

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

<br />

*** ** * ** ***

Callback for receiving the result of[sendCustomAction(String, Bundle, MediaBrowserCompat.CustomActionCallback)](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat#sendCustomAction(java.lang.String, android.os.Bundle, android.support.v4.media.MediaBrowserCompat.CustomActionCallback)).

## Summary

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

|                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                      ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onError](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onError(java.lang.String, android.os.Bundle, android.os.Bundle))`(String action, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` extras, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` data) ` Called when an error happens while performing the custom action or the connected service doesn't support the requested custom action. |
| ` void` | ` `[onProgressUpdate](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onProgressUpdate(java.lang.String, android.os.Bundle, android.os.Bundle))`(String action, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` extras, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` data) ` Called when an interim update was delivered from the connected service while performing the custom action.          |
| ` void` | ` `[onResult](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onResult(java.lang.String, android.os.Bundle, android.os.Bundle))`(String action, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` extras, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` resultData) ` Called when the custom action finished successfully.                                                                          |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4-media/MediaBrowserCompat.CustomActionCallback#)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.CustomActionCallback

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

```
MediaBrowserCompat.CustomActionCallback ()
```

<br />

<br />

## Public methods

### onError

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

```
void onError (String action,
                Bundle extras,
                Bundle data)
```

Called when an error happens while performing the custom action or the connected service doesn't support the requested custom action.

<br />

|                                             Parameters                                             ||
|----------|------------------------------------------------------------------------------------------|
| `action` | `String`: The custom action sent to the connected service. <br />                        |
| `extras` | `Bundle`: The bundle of service-specific arguments sent to the connected service. <br /> |
| `data`   | `Bundle`: The additional data delivered from the connected service. <br />               |

### onProgressUpdate

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

```
void onProgressUpdate (String action,
                Bundle extras,
                Bundle data)
```

Called when an interim update was delivered from the connected service while performing the custom action.

<br />

|                                             Parameters                                             ||
|----------|------------------------------------------------------------------------------------------|
| `action` | `String`: The custom action sent to the connected service. <br />                        |
| `extras` | `Bundle`: The bundle of service-specific arguments sent to the connected service. <br /> |
| `data`   | `Bundle`: The additional data delivered from the connected service. <br />               |

### onResult

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

```
void onResult (String action,
                Bundle extras,
                Bundle resultData)
```

Called when the custom action finished successfully.

<br />

|                                               Parameters                                               ||
|--------------|------------------------------------------------------------------------------------------|
| `action`     | `String`: The custom action sent to the connected service. <br />                        |
| `extras`     | `Bundle`: The bundle of service-specific arguments sent to the connected service. <br /> |
| `resultData` | `Bundle`: The additional data delivered from the connected service. <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)