# MediaBrowserCompat.SubscriptionCallback

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.SubscriptionCallback) 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.SubscriptionCallback
```

<br />

*** ** * ** ***

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

Callbacks for subscription related events.

## Summary

| ### Public constructors |
|---|
| `[SubscriptionCallback](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#SubscriptionCallback())()` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onChildrenLoaded](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onChildrenLoaded(java.lang.String,java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>))( parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, children: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.MediaItem!> )` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onChildrenLoaded](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onChildrenLoaded(java.lang.String,java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>,android.os.Bundle))( parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, children: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.MediaItem!>, options: 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` | `[onError](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onError(java.lang.String))(parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onError](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onError(java.lang.String,android.os.Bundle))(parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, options: https://developer.android.com/reference/android/os/Bundle.html)` **This function is deprecated.** Deprecated in Java |

## Public constructors

### SubscriptionCallback

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)

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

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

## Public functions

### onChildrenLoaded

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 [onChildrenLoaded](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onChildrenLoaded(java.lang.String,java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>))(
    parentId: String,
    children: (Mutable)List<MediaBrowserCompat.MediaItem!>
): Unit
```

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

Called when the list of children is loaded or updated.

| Parameters |
|---|---|
| `parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The media id of the parent media item. |
| `children: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.MediaItem!>` | The children which were loaded. |

### onChildrenLoaded

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 [onChildrenLoaded](https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.SubscriptionCallback#onChildrenLoaded(java.lang.String,java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>,android.os.Bundle))(
    parentId: String,
    children: (Mutable)List<MediaBrowserCompat.MediaItem!>,
    options: Bundle
): Unit
```

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

Called when the list of children is loaded or updated.

| Parameters |
|---|---|
| `parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The media id of the parent media item. |
| `children: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat.MediaItem!>` | The children which were loaded. |
| `options: https://developer.android.com/reference/android/os/Bundle.html` | A bundle of service-specific arguments to send to the media browse service. The contents of this bundle may affect the information returned when browsing. |

### 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.SubscriptionCallback#onError(java.lang.String))(parentId: String): Unit
```

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

Called when the id doesn't exist or other errors in subscribing.

If this is called, the subscription remains until `https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat#unsubscribe(java.lang.String)` called, because some errors may heal themselves.

| Parameters |
|---|---|
| `parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The media id of the parent media item whose children could not be loaded. |

### 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.SubscriptionCallback#onError(java.lang.String,android.os.Bundle))(parentId: String, options: Bundle): Unit
```

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

Called when the id doesn't exist or other errors in subscribing.

If this is called, the subscription remains until `https://developer.android.com/reference/kotlin/android/support/v4/media/MediaBrowserCompat#unsubscribe(java.lang.String)` called, because some errors may heal themselves.

| Parameters |
|---|---|
| `parentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The media id of the parent media item whose children could not be loaded. |
| `options: https://developer.android.com/reference/android/os/Bundle.html` | A bundle of service-specific arguments sent to the media browse service. |