Java android.media.session MediaSession fields, constructors, methods, implement or subclass

Example usage for Java android.media.session MediaSession fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.media.session MediaSession.

The text is from its open source code.

Field

intFLAG_HANDLES_MEDIA_BUTTONS
Set this flag on the session to indicate that it can handle media button events.
intFLAG_HANDLES_TRANSPORT_CONTROLS
Set this flag on the session to indicate that it handles transport control commands through its Callback .

Constructor

Method

voidsetFlags(@SessionFlags int flags)
Set any flags for the session.
voidsetMediaButtonReceiver(@Nullable PendingIntent mbr)
Set a pending intent for your media button receiver to allow restarting playback after the session has been stopped.
voidsetSessionActivity(@Nullable PendingIntent pi)
Set an intent for launching UI for this Session.