TilesTimelineManager
class TilesTimelineManager : AutoCloseable
Manager for a single Wear Tiles timeline.
This handles the dispatching of single Tile layouts from a full timeline. It will set the correct alarms to detect when a layout should be updated, and dispatch it to its listener.
Summary
Nested types |
|---|
interface TilesTimelineManager.ClockInterface so this manager can retrieve the current time. |
|
Type to listen for layout updates from a given timeline. |
interface TilesTimelineManager.ListenerThis interface is deprecated. Use |
Public constructors |
|---|
TilesTimelineManager(Default constructor. |
This function is deprecated. Use |
Public functions |
|
|---|---|
Unit |
close()Tears down this Timeline Manager. |
Unit |
init()Sets up this Timeline Manager. |
Public constructors
TilesTimelineManager
TilesTimelineManager(
alarmManager: AlarmManager,
clock: TilesTimelineManager.Clock,
timeline: TimelineBuilders.Timeline,
token: Int,
listenerExecutor: Executor,
listener: TilesTimelineManager.LayoutUpdateListener
)
Default constructor.
| Parameters | |
|---|---|
alarmManager: AlarmManager |
An AlarmManager instance suitable for setting RTC alarms on. |
clock: TilesTimelineManager.Clock |
A Clock to use to ascertain the current time (and hence which tile to show). This should be synchronized to the same clock as used by |
timeline: TimelineBuilders.Timeline |
The Tiles timeline to use. |
token: Int |
A token, which will be passed to |
listenerExecutor: Executor |
the executor for |
listener: TilesTimelineManager.LayoutUpdateListener |
A listener instance, called when a new timeline entry is available. |
TilesTimelineManager(
alarmManager: AlarmManager,
clock: TilesTimelineManager.Clock,
timeline: TimelineBuilders.Timeline,
token: Int,
listenerExecutor: Executor,
listener: TilesTimelineManager.Listener
)
Default constructor.
| Parameters | |
|---|---|
alarmManager: AlarmManager |
An AlarmManager instance suitable for setting RTC alarms on. |
clock: TilesTimelineManager.Clock |
A Clock to use to ascertain the current time (and hence which tile to show). This should be synchronized to the same clock as used by |
timeline: TimelineBuilders.Timeline |
The Tiles timeline to use. |
token: Int |
A token, which will be passed to |
listenerExecutor: Executor |
the executor for |
listener: TilesTimelineManager.Listener |
A listener instance, called when a new timeline entry is available. |