MediaPlaybackManager
@RequiresCarApi(value = 8)
class MediaPlaybackManager : Manager
Manager for communicating Media Session Token the host.
Apps must use this interface to coordinate with the car system to allow media playback.
Summary
Public functions |
|
|---|---|
Unit |
Sends a media session token to the host in order to allow the host to read the media session playback state. |
Public functions
registerMediaPlaybackToken
Added in 1.4.0
@MainThread
fun registerMediaPlaybackToken(token: MediaSessionCompat.Token): Unit
Sends a media session token to the host in order to allow the host to read the media session playback state.
| Parameters | |
|---|---|
token: MediaSessionCompat.Token |
to be sent to the host |
| Throws | |
|---|---|
java.lang.IllegalArgumentException |
if any of the token cannot be serialized |
java.lang.IllegalStateException |
if this is not called from the main thread. |