1// Copyright 2014 Google Inc. All Rights Reserved. 2 3package android.service.media; 4 5import android.content.pm.ParceledListSlice; 6import android.graphics.Bitmap; 7import android.media.session.MediaSession; 8import android.os.Bundle; 9 10/** 11 * Media API allows clients to browse through hierarchy of a user’s media collection, 12 * playback a specific media entry and interact with the now playing queue. 13 * @hide 14 */ 15oneway interface IMediaBrowserServiceCallbacks { 16 /** 17 * Invoked when the connected has been established. 18 * @param root The root media id for browsing. 19 * @param session The {@link MediaSession.Token media session token} that can be used to control 20 * the playback of the media app. 21 * @param extra Extras returned by the media service. 22 */ 23 void onConnect(String root, in MediaSession.Token session, in Bundle extras); 24 void onConnectFailed(); 25 void onLoadChildren(String mediaId, in ParceledListSlice list); 26 void onLoadChildrenWithOptions(String mediaId, in ParceledListSlice list, in Bundle options); 27} 28