Example usage for Java android.media.session MediaSession fields, constructors, methods, implement or subclass
The text is from its open source code.
int | FLAG_HANDLES_MEDIA_BUTTONS Set this flag on the session to indicate that it can handle media button events. |
int | FLAG_HANDLES_TRANSPORT_CONTROLS Set this flag on the session to indicate that it handles transport control commands through its Callback . |
MediaSession(@NonNull Context context, @NonNull String tag) Creates a new session. |
void | setFlags(@SessionFlags int flags) Set any flags for the session. |
void | setMediaButtonReceiver(@Nullable PendingIntent mbr) Set a pending intent for your media button receiver to allow restarting playback after the session has been stopped. |
void | setSessionActivity(@Nullable PendingIntent pi) Set an intent for launching UI for this Session. |