Class CarNowPlayingTemplate
java.lang.Object
com.codename1.car.CarTemplate
com.codename1.car.CarNowPlayingTemplate
The system now-playing surface for audio apps. On both platforms the track metadata, artwork,
transport controls and scrubber are driven by the platform media session -- on Android by the
MediaSession behind Codename One's background audio service, on iOS by MPNowPlayingInfoCenter
/ the remote command center -- so this template carries no metadata of its own. It exists to (a)
route the head unit to the now-playing screen and (b) add up-to-two app-specific buttons
(shuffle, repeat, like, rate). Maps to CPNowPlayingTemplate and the Android Auto now-playing
view.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an app-specific now-playing button (e.g. shuffle / repeat / like).Returns the app-specific now-playing buttons, in order.booleanReturns true when an "Up next" affordance should be offered.setUpNextVisible(boolean upNextVisible) Sets whether the head unit offers an "Up next" button that lets the driver browse the queue.Methods inherited from class CarTemplate
getTitle
-
Constructor Details
-
CarNowPlayingTemplate
public CarNowPlayingTemplate()
-
-
Method Details
-
addAction
Adds an app-specific now-playing button (e.g. shuffle / repeat / like). The head unit shows a small fixed number of these alongside the system transport controls.
Parameters
action: the button to add
Returns
this template, for chaining
-
getActions
-
isUpNextVisible
public boolean isUpNextVisible()Returns true when an "Up next" affordance should be offered. -
setUpNextVisible
Sets whether the head unit offers an "Up next" button that lets the driver browse the queue.
Parameters
upNextVisible: true to show the up-next affordance
Returns
this template, for chaining
-