MediaPlaybackTemplate


@RequiresCarApi(value = 8)
@CarProtocol
public class MediaPlaybackTemplate implements Template


A template representing content to display for media playback.

Template Requirement

A pre requisite for using this template is the usage of registerMediaPlaybackToken.

Note: Starting in Car API 9, all media apps will render with a persistent entrypoint to the full screen MediaPlaybackTemplate. The CAL Host may render that entrypoint as an action (on smaller screens) to a mini-controller bar (on larger screens). When a user clicks on this, the host will send a callback with the ACTION_SHOW_MEDIA_PLAYBACK intent. All 3P Media Apps MUST handle this intent callback.

Summary

Nested types

@RequiresCarApi(value = 8)
public final class MediaPlaybackTemplate.Builder

Builder for the MediaPlaybackTemplate

Public methods

boolean
@Nullable Banner

Returns the Banner to display in this template or not to display one if it is null.

@Nullable Header

Returns the Header to display in this template or not to display one if it is null.

@Nullable MediaPlaybackStyle

Returns the MediaPlaybackStyle for this template or null if none was set.

int
@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getBanner

Added in 1.8.0
@ExperimentalCarApi
@RequiresCarApi(value = 9)
public @Nullable Banner getBanner()

Returns the Banner to display in this template or not to display one if it is null.

getHeader

Added in 1.7.0
public @Nullable Header getHeader()

Returns the Header to display in this template or not to display one if it is null.

getStyle

Added in 1.9.0-alpha02
@ExperimentalCarApi
@RequiresCarApi(value = 9)
public @Nullable MediaPlaybackStyle getStyle()

Returns the MediaPlaybackStyle for this template or null if none was set.

hashCode

public int hashCode()

toString

public @NonNull String toString()