Most visited

Recently visited

Added in API level 21

MediaBrowser.SubscriptionCallback

public static abstract class MediaBrowser.SubscriptionCallback
extends Object

java.lang.Object
   ↳ android.media.browse.MediaBrowser.SubscriptionCallback


订阅相关事件的回调。

Summary

Public constructors

MediaBrowser.SubscriptionCallback()

Public methods

void onChildrenLoaded(String parentId, List<MediaBrowser.MediaItem> children)

当儿童列表被加载或更新时调用。

void onChildrenLoaded(String parentId, List<MediaBrowser.MediaItem> children, Bundle options)

当儿童列表被加载或更新时调用。

void onError(String parentId)

当订阅中不存在id或其他错误时调用。

void onError(String parentId, Bundle options)

当订阅中不存在id或其他错误时调用。

Inherited methods

From class java.lang.Object

Public constructors

MediaBrowser.SubscriptionCallback

Added in API level 21
MediaBrowser.SubscriptionCallback ()

Public methods

onChildrenLoaded

Added in API level 21
void onChildrenLoaded (String parentId, 
                List<MediaBrowser.MediaItem> children)

当儿童列表被加载或更新时调用。

Parameters
parentId String: The media id of the parent media item.
children List: The children which were loaded.

onChildrenLoaded

Added in API level 24
void onChildrenLoaded (String parentId, 
                List<MediaBrowser.MediaItem> children, 
                Bundle options)

当儿童列表被加载或更新时调用。

Parameters
parentId String: The media id of the parent media item.
children List: The children which were loaded.
options Bundle: A bundle of service-specific arguments sent to the media browse service. The contents of this bundle may affect the information returned when browsing.

onError

Added in API level 21
void onError (String parentId)

当订阅中不存在id或其他错误时调用。

如果这被调用,订阅将保持到 unsubscribe(String)为止,因为一些错误可能会自行修复。

Parameters
parentId String: The media id of the parent media item whose children could not be loaded.

onError

Added in API level 24
void onError (String parentId, 
                Bundle options)

当订阅中不存在id或其他错误时调用。

如果这被调用,订阅会一直保留到 unsubscribe(String)为止,因为一些错误可能会自行修复。

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.

Hooray!