MediaPlaybackTemplate


@RequiresCarApi(value = 8)
@CarProtocol
class MediaPlaybackTemplate : 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

Builder for the MediaPlaybackTemplate

Public functions

Boolean
equals(other: Any?)
Banner?

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

Header?

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

MediaPlaybackStyle?

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

Int
String

Public functions

equals

fun equals(other: Any?): Boolean

getBanner

Added in 1.8.0
@ExperimentalCarApi
@RequiresCarApi(value = 9)
fun getBanner(): Banner?

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

getHeader

Added in 1.7.0
fun getHeader(): Header?

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)
fun getStyle(): MediaPlaybackStyle?

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

hashCode

fun hashCode(): Int

toString

fun toString(): String