IMediaController


public interface IMediaController extends IInterface

Known direct subclasses
IMediaController.Default

Default implementation for IMediaController.

IMediaController.Stub

Local-side IPC implementation stub class.


Interface from MediaSession to MediaController.

It's for internal use only, not intended to be used by library users.

Summary

Nested types

Default implementation for IMediaController.

public abstract class IMediaController.Stub extends Binder implements IMediaController

Local-side IPC implementation stub class.

Constants

default static final String
DESCRIPTOR = "androidx.media3.session.IMediaController"

Public methods

abstract void
onAvailableCommandsChangedFromPlayer(int seq, Bundle commandsBundle)
abstract void
onAvailableCommandsChangedFromSession(
    int seq,
    Bundle sessionCommandsBundle,
    Bundle playerCommandsBundle
)
abstract void
onChildrenChanged(
    int seq,
    String parentId,
    int itemCount,
    Bundle libraryParams
)
abstract void
onConnected(int seq, Bundle connectionResult)
abstract void
onCustomCommand(int seq, Bundle command, Bundle args)
abstract void
onDisconnected(int seq)
abstract void
onError(int seq, Bundle sessionError)
abstract void
onExtrasChanged(int seq, Bundle extras)
abstract void
onLibraryResult(int seq, Bundle libraryResult)
abstract void
onPeriodicSessionPositionInfoChanged(
    int seq,
    Bundle sessionPositionInfo
)
abstract void
onPlayerInfoChanged(
    int seq,
    Bundle playerInfoBundle,
    boolean isTimelineExcluded
)

Deprecated: Use onPlayerInfoChangedWithExclusions from MediaControllerStub#VERSION_INT=2.

abstract void
onPlayerInfoChangedWithExclusions(
    int seq,
    Bundle playerInfoBundle,
    Bundle playerInfoExclusions
)

Introduced to deprecate onPlayerInfoChanged (from MediaControllerStub#VERSION_INT=2).

abstract void
abstract void
onSearchResultChanged(
    int seq,
    String query,
    int itemCount,
    Bundle libraryParams
)
abstract void
onSessionActivityChanged(int seq, PendingIntent pendingIntent)
abstract void
onSessionResult(int seq, Bundle sessionResult)
abstract void
onSetCustomLayout(int seq, List<Bundle> commandButtonList)
abstract void
onSetMediaButtonPreferences(int seq, List<Bundle> commandButtonList)

Inherited methods

From android.os.IInterface
abstract IBinder

Constants

DESCRIPTOR

default static final String DESCRIPTOR = "androidx.media3.session.IMediaController"

Public methods

onAvailableCommandsChangedFromPlayer

abstract void onAvailableCommandsChangedFromPlayer(int seq, Bundle commandsBundle)

onAvailableCommandsChangedFromSession

abstract void onAvailableCommandsChangedFromSession(
    int seq,
    Bundle sessionCommandsBundle,
    Bundle playerCommandsBundle
)

onChildrenChanged

abstract void onChildrenChanged(
    int seq,
    String parentId,
    int itemCount,
    Bundle libraryParams
)

onConnected

abstract void onConnected(int seq, Bundle connectionResult)

onCustomCommand

abstract void onCustomCommand(int seq, Bundle command, Bundle args)

onDisconnected

abstract void onDisconnected(int seq)

onError

abstract void onError(int seq, Bundle sessionError)

onExtrasChanged

abstract void onExtrasChanged(int seq, Bundle extras)

onLibraryResult

abstract void onLibraryResult(int seq, Bundle libraryResult)

onPeriodicSessionPositionInfoChanged

abstract void onPeriodicSessionPositionInfoChanged(
    int seq,
    Bundle sessionPositionInfo
)

onPlayerInfoChanged

abstract void onPlayerInfoChanged(
    int seq,
    Bundle playerInfoBundle,
    boolean isTimelineExcluded
)

Deprecated: Use onPlayerInfoChangedWithExclusions from MediaControllerStub#VERSION_INT=2.

onPlayerInfoChangedWithExclusions

abstract void onPlayerInfoChangedWithExclusions(
    int seq,
    Bundle playerInfoBundle,
    Bundle playerInfoExclusions
)

Introduced to deprecate onPlayerInfoChanged (from MediaControllerStub#VERSION_INT=2).

onRenderedFirstFrame

abstract void onRenderedFirstFrame(int seq)

onSearchResultChanged

abstract void onSearchResultChanged(
    int seq,
    String query,
    int itemCount,
    Bundle libraryParams
)

onSessionActivityChanged

abstract void onSessionActivityChanged(int seq, PendingIntent pendingIntent)

onSessionResult

abstract void onSessionResult(int seq, Bundle sessionResult)

onSetCustomLayout

abstract void onSetCustomLayout(int seq, List<Bundle> commandButtonList)

onSetMediaButtonPreferences

abstract void onSetMediaButtonPreferences(int seq, List<Bundle> commandButtonList)