@Implements(android.support.v4.media.MediaBrowserCompat.class) public class ShadowMediaBrowserCompat extends Object
MediaBrowserServiceCompat
by creating and maintaining
its own account of MediaBrowserCompat.MediaItem
s.Constructor | Description |
---|---|
ShadowMediaBrowserCompat() |
@Implementation protected void __constructor__(Context context, ComponentName serviceComponent, android.support.v4.media.MediaBrowserCompat.ConnectionCallback callback, Bundle rootHints)
@Implementation protected void connect()
@Implementation protected void disconnect()
@Implementation protected boolean isConnected()
@Implementation protected String getRoot()
@Implementation protected void getItem(@NonNull String mediaId, @NonNull android.support.v4.media.MediaBrowserCompat.ItemCallback cb)
@Implementation protected void subscribe(@NonNull String parentId, @NonNull android.support.v4.media.MediaBrowserCompat.SubscriptionCallback callback)
@Implementation protected void subscribe(@NonNull String parentId, @Nullable Bundle options, @NonNull android.support.v4.media.MediaBrowserCompat.SubscriptionCallback callback)
@Implementation protected void search(@NonNull String query, Bundle extras, @NonNull android.support.v4.media.MediaBrowserCompat.SearchCallback callback)
MediaBrowserCompat.MediaItem
's with a title that {@param query} is a substring of.@Implementation public android.support.v4.media.session.MediaSessionCompat.Token getSessionToken()
public void setRootId(String mediaId)
mediaId
- the id of the root MediaItem. This MediaItem should already have been created.public android.support.v4.media.MediaBrowserCompat.MediaItem createMediaItem(String parentId, String mediaId, String title, int flag)
parentId
- the id of the parent MediaItem. If the MediaItem to be created will be the
root, parentId should be null.mediaId
- the id of the MediaItem to be created.title
- the title of the MediaItem to be created.flag
- says if the MediaItem to be created is browsable and/or playable.public Map<android.support.v4.media.MediaBrowserCompat.MediaItem,List<android.support.v4.media.MediaBrowserCompat.MediaItem>> getCopyOfMediaItemChildren()
Map
that maps MediaBrowserCompat.MediaItem
s to their children.