MediaPlaybackManager


@ExperimentalCarApi
public class MediaPlaybackManager implements 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 methods

void

Sends a media session token to the host in order to allow the host to read the media session playback state.

Public methods

registerMediaPlaybackToken

Added in 1.4.0
@MainThread
public void registerMediaPlaybackToken(@NonNull MediaSessionCompat.Token token)

Sends a media session token to the host in order to allow the host to read the media session playback state.

Parameters
@NonNull MediaSessionCompat.Token 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.