O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

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.

To extend this class, you must declare the service in your manifest file with an intent filter with the 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 MediaBrowserServiceCompat.

Constants
static String

The Intent that must be declared as handled by the service.

Public constructors

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 MediaBrowserCompat.

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?
onBind(intent: Intent!)

open Unit

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?
onGetRoot(@NonNull clientPackageName: String, clientUid: Int, @Nullable rootHints: Bundle?)

Called to get the root information for browsing by a particular client.

abstract Unit

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

Called to get information about a specific media item.

open Unit
onSearch(@NonNull query: String, extras: