Example usage for Java android.support.v4.media.session MediaSessionCompat fields, constructors, methods, implement or subclass
The text is from its open source code.
int | FLAG_HANDLES_MEDIA_BUTTONS Sets this flag on the session to indicate that it can handle media button events. |
int | FLAG_HANDLES_TRANSPORT_CONTROLS Sets this flag on the session to indicate that it handles transport control commands through its Callback . |
int | FLAG_HANDLES_QUEUE_COMMANDS Sets this flag on the session to indicate that it handles queue management commands through its Callback . |
MediaSessionCompat(@NonNull Context context, @NonNull String tag) Creates a new session. | |
MediaSessionCompat(Context context, MediaSessionImpl impl) | |
MediaSessionCompat(@NonNull Context context, @NonNull String tag, @Nullable ComponentName mbrComponent, @Nullable PendingIntent mbrIntent) Creates a new session with a specified media button receiver (a component name and/or a pending intent). |
MediaControllerCompat | getController() Gets a controller for this session. |
Object | getRemoteControlClient() Gets the underlying framework android.media.RemoteControlClient object. |
Token | getSessionToken() Retrieves a token object that can be used by apps to create a MediaControllerCompat for interacting with this session. |
void | release() This must be called when an app has finished performing playback. |
void | sendSessionEvent(String event, Bundle extras) Sends a proprietary event to all MediaControllers listening to this Session. |
void | setActive(boolean active) Sets if this session is currently active and ready to receive commands. |
void | setCallback(Callback callback) Adds a callback to receive updates on for the MediaSession. |
void | setCaptioningEnabled(boolean enabled) Enables/disables captioning for this session. |
void | setExtras(Bundle extras) Sets some extras that can be associated with the MediaSessionCompat . |
void | setFlags(@SessionFlags int flags) Sets any flags for the session. |
void | setMetadata(MediaMetadataCompat metadata) Updates the current metadata. |
void | setPlaybackState(PlaybackStateCompat state) Updates the current playback state. |
void | setPlaybackToLocal(int stream) Sets the stream this session is playing on. |
void | setPlaybackToRemote(VolumeProviderCompat volumeProvider) Configures this session to use remote volume handling. |
void | setQueue(List Updates the list of items in the play queue. |
void | setQueueTitle(CharSequence title) Sets the title of the play queue. |
void | setRatingType(@RatingCompat.Style int type) Sets the style of rating used by this session. |
void | setRepeatMode(@PlaybackStateCompat.RepeatMode int repeatMode) Sets the repeat mode for this session. |
void | setSessionActivity(PendingIntent pi) Sets an intent for launching UI for this Session. |
void | setShuffleMode(@PlaybackStateCompat.ShuffleMode int shuffleMode) Sets the shuffle mode for this session. |