MediaBrowserServiceCompat
abstract class MediaBrowserServiceCompat : Service
kotlin.Any | ||||
↳ | android.content.Context | |||
↳ | android.content.ContextWrapper | |||
↳ | android.app.Service | |||
↳ | androidx.media.MediaBrowserServiceCompat |
Base class for media browse services.
Media browse services enable applications to browse media content provided by an application and ask the application to start playing it. They may also be used to control content that is already playing by way of a MediaSessionCompat
.
SERVICE_INTERFACE
action. For example:
<service android:name=".MyMediaBrowserServiceCompat" android:label="@string/service_name" > <intent-filter> <action android:name="android.media.browse.MediaBrowserService" /> </intent-filter> </service>
Summary
Nested classes | |
---|---|
Contains information that the browser service needs to send to the client when first connected. |
|
open |
Completion handler for asynchronous callback methods in |
Constants | |
---|---|
static String |
The |
Public constructors | |
---|---|
<init>() Base class for media browse services. |
Public methods | |
---|---|
open Unit |
dump(fd: FileDescriptor!, writer: PrintWriter!, args: Array<String!>!) |
Bundle! |
Gets the root hints sent from the currently connected |
MediaSessionManager.RemoteUserInfo |
Gets the browser information who sent the current request. |
open MediaSessionCompat.Token? |
Gets the session token, or null if it has not yet been created or if it has been destroyed. |
open Unit |
notifyChildrenChanged(@NonNull parentId: String) Notifies all connected media browsers that the children of the specified parent id have changed in some way. |
open Unit |
notifyChildrenChanged(@NonNull parentId: String, @NonNull options: Bundle) Notifies all connected media browsers that the children of the specified parent id have changed in some way. |
open IBinder? | |
open Unit |
onCreate() |
open Unit |
onCustomAction(@NonNull action: String, extras: Bundle!, @NonNull result: MediaBrowserServiceCompat.Result<Bundle!>) Called to request a custom action to this service. |
abstract MediaBrowserServiceCompat.BrowserRoot? |
Called to get the root information for browsing by a particular client. |
abstract Unit |
onLoadChildren(@NonNull parentId: String, @NonNull result: MediaBrowserServiceCompat.Result<MutableList<MediaBrowserCompat.MediaItem!>!>) Called to get information about the children of a media item. |
open Unit |
onLoadChildren(@NonNull parentId: String, @NonNull result: MediaBrowserServiceCompat.Result<MutableList<MediaBrowserCompat.MediaItem!>!>, @NonNull options: Bundle) Called to get information about the children of a media item. |
open Unit |
onLoadItem(itemId: String!, @NonNull result: MediaBrowserServiceCompat.Result<MediaBrowserCompat.MediaItem!>) Called to get information about a specific media item. |
open Unit |