# 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)

*** ** * ** ***


```
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/kotlin/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/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#CustomActionCallback())()` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onError](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onError(java.lang.String,android.os.Bundle,android.os.Bundle))(action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, extras: https://developer.android.com/reference/android/os/Bundle.html!, data: https://developer.android.com/reference/android/os/Bundle.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onProgressUpdate](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onProgressUpdate(java.lang.String,android.os.Bundle,android.os.Bundle))(action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, extras: https://developer.android.com/reference/android/os/Bundle.html!, data: https://developer.android.com/reference/android/os/Bundle.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onResult](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onResult(java.lang.String,android.os.Bundle,android.os.Bundle))(action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, extras: https://developer.android.com/reference/android/os/Bundle.html!, resultData: https://developer.android.com/reference/android/os/Bundle.html!)` **This function is deprecated.** Deprecated in Java |

## Public constructors

### CustomActionCallback

Added in 1.1.0 Deprecated in 1.8.0

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

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

## Public functions

### 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)

```
fun [onError](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onError(java.lang.String,android.os.Bundle,android.os.Bundle))(action: String!, extras: Bundle!, data: Bundle!): Unit
```

> [!CAUTION]
> **This function 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 |
|---|---|
| `action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The custom action sent to the connected service. |
| `extras: https://developer.android.com/reference/android/os/Bundle.html!` | The bundle of service-specific arguments sent to the connected service. |
| `data: https://developer.android.com/reference/android/os/Bundle.html!` | 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)

```
fun [onProgressUpdate](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onProgressUpdate(java.lang.String,android.os.Bundle,android.os.Bundle))(action: String!, extras: Bundle!, data: Bundle!): Unit
```

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

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

| Parameters |
|---|---|
| `action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The custom action sent to the connected service. |
| `extras: https://developer.android.com/reference/android/os/Bundle.html!` | The bundle of service-specific arguments sent to the connected service. |
| `data: https://developer.android.com/reference/android/os/Bundle.html!` | 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)

```
fun [onResult](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.CustomActionCallback#onResult(java.lang.String,android.os.Bundle,android.os.Bundle))(action: String!, extras: Bundle!, resultData: Bundle!): Unit
```

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

Called when the custom action finished successfully.

| Parameters |
|---|---|
| `action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The custom action sent to the connected service. |
| `extras: https://developer.android.com/reference/android/os/Bundle.html!` | The bundle of service-specific arguments sent to the connected service. |
| `resultData: https://developer.android.com/reference/android/os/Bundle.html!` | The additional data delivered from the connected service. |