Allows interaction with media controllers, volume keys, media buttons, and transport controls.
A MediaSession should be created when an app wants to publish media playback information or handle media keys. In general an app only needs one session for all playback, though multiple sessions can be created to provide finer grain controls of media.
Once a session is created the owner of the session may pass its session token to other processes to allow them to create a MediaController to interact with the session.
To receive commands, media keys, and other events a MediaSession.Callback must be set with setCallback(Callback) and setActive(true) must be called.
When an app is finished performing playback it must call release() to clean up the session and notify any controllers.