# MediaBrowserCompat.CustomActionCallback

Artifact: [androidx.media:media](https://developer.android.com/jetpack/androidx/releases/media) [View Source](https://cs.android.com/search?q=file:android/support/v4/media/MediaBrowserCompat.java+class:android.support.v4.media.MediaBrowserCompat.CustomActionCallback) 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 MediaBrowserCompat.CustomActionCallback
```

<br />

*** ** * ** ***

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

Callback for receiving the result of `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 |
|---|
| `[CustomActionCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#CustomActionCallback())()` **This method is deprecated.** Deprecated in Java |

| ### 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))(https://developer.android.com/reference/java/lang/String.html action, https://developer.android.com/reference/android/os/Bundle.html extras, https://developer.android.com/reference/android/os/Bundle.html data)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onProgressUpdate](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onProgressUpdate(java.lang.String,android.os.Bundle,android.os.Bundle))(https://developer.android.com/reference/java/lang/String.html action, https://developer.android.com/reference/android/os/Bundle.html extras, https://developer.android.com/reference/android/os/Bundle.html data)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onResult](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onResult(java.lang.String,android.os.Bundle,android.os.Bundle))(https://developer.android.com/reference/java/lang/String.html action, https://developer.android.com/reference/android/os/Bundle.html extras, https://developer.android.com/reference/android/os/Bundle.html resultData)` **This method is deprecated.** Deprecated in Java |

## Public constructors

### CustomActionCallback

Added in 1.1.0 Deprecated in 1.8.0

```
public [CustomActionCallback](https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#CustomActionCallback())()
```

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

## Public methods

### onError

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 [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 extras, Bundle data)
```

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

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html action` | The custom action sent to the connected service. |
| `https://developer.android.com/reference/android/os/Bundle.html extras` | The bundle of service-specific arguments sent to the connected service. |
| `https://developer.android.com/reference/android/os/Bundle.html data` | The additional data delivered from the connected service. |

### onProgressUpdate

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 [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 extras, Bundle data)
```

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

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html action` | The custom action sent to the connected service. |
| `https://developer.android.com/reference/android/os/Bundle.html extras` | The bundle of service-specific arguments sent to the connected service. |
| `https://developer.android.com/reference/android/os/Bundle.html data` | The additional data delivered from the connected service. |

### onResult

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 [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 extras, Bundle resultData)
```

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

Called when the custom action finished successfully.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html action` | The custom action sent to the connected service. |
| `https://developer.android.com/reference/android/os/Bundle.html extras` | The bundle of service-specific arguments sent to the connected service. |
| `https://developer.android.com/reference/android/os/Bundle.html resultData` | The additional data delivered from the connected service. |