MediaBrowserCompat.SubscriptionCallback

public abstract class MediaBrowserCompat.SubscriptionCallback


Callbacks for subscription related events.

Summary

Public constructors

Public methods

void

Called when the list of children is loaded or updated.

void
onChildrenLoaded(
    @NonNull String parentId,
    @NonNull List<MediaBrowserCompat.MediaItem> children,
    @NonNull Bundle options
)

Called when the list of children is loaded or updated.

void
onError(@NonNull String parentId)

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

void
onError(@NonNull String parentId, @NonNull Bundle options)

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

Public constructors

SubscriptionCallback

Added in 1.1.0
public SubscriptionCallback()

Public methods

onChildrenLoaded

Added in 1.1.0
public void onChildrenLoaded(
    @NonNull String parentId,
    @NonNull List<MediaBrowserCompat.MediaItem> children
)

Called when the list of children is loaded or updated.

Parameters
@NonNull String parentId

The media id of the parent media item.

@NonNull List<MediaBrowserCompat.MediaItem> children

The children which were loaded.

onChildrenLoaded

Added in 1.1.0
public void onChildrenLoaded(
    @NonNull String parentId,
    @NonNull List<MediaBrowserCompat.MediaItem> children,
    @NonNull Bundle options
)

Called when the list of children is loaded or updated.

Parameters
@NonNull String parentId

The media id of the parent media item.

@NonNull List<MediaBrowserCompat.MediaItem> children

The children which were loaded.

@NonNull Bundle options

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
public void onError(@NonNull String parentId)

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
@NonNull String parentId

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

onError

Added in 1.1.0
public void onError(@NonNull String parentId, @NonNull Bundle options)

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
@NonNull String parentId

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

@NonNull Bundle options

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