MediaBrowserCompat.SubscriptionCallback

abstract class MediaBrowserCompat.SubscriptionCallback


Callbacks for subscription related events.

Summary

Public constructors

Public functions

Unit
onChildrenLoaded(
    parentId: String,
    children: (Mutable)List<MediaBrowserCompat.MediaItem!>
)

Called when the list of children is loaded or updated.

Unit
onChildrenLoaded(
    parentId: String,
    children: (Mutable)List<MediaBrowserCompat.MediaItem!>,
    options: Bundle
)

Called when the list of children is loaded or updated.

Unit
onError(parentId: String)

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

Unit
onError(parentId: String, options: Bundle)

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

Public constructors

SubscriptionCallback

Added in 1.1.0
SubscriptionCallback()

Public functions

onChildrenLoaded

Added in 1.1.0
fun onChildrenLoaded(
    parentId: String,
    children: (Mutable)List<MediaBrowserCompat.MediaItem!>
): Unit

Called when the list of children is loaded or updated.

Parameters
parentId: String

The media id of the parent media item.

children: (Mutable)List<MediaBrowserCompat.MediaItem!>

The children which were loaded.

onChildrenLoaded

Added in 1.1.0
fun onChildrenLoaded(
    parentId: String,
    children: (Mutable)List<MediaBrowserCompat.MediaItem!>,
    options: Bundle
): Unit

Called when the list of children is loaded or updated.

Parameters
parentId: String

The media id of the parent media item.

children: (Mutable)List<MediaBrowserCompat.MediaItem!>

The children which were loaded.

options: Bundle

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
fun onError(parentId: String): Unit

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

If this is called, the subscription remains until unsubscribe called, because some errors may heal themselves.

Parameters
parentId: String

The media id of the parent media item whose children could not be loaded.

onError

Added in 1.1.0
fun onError(parentId: String, options: Bundle): Unit

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

If this is called, the subscription remains until unsubscribe called, because some errors may heal themselves.

Parameters
parentId: String

The media id of the parent media item whose children could not be loaded.

options: Bundle

A bundle of service-specific arguments sent to the media browse service.