Note: The Wearable Support Library classes under the android.support.wearable
package are subject to change. For the full Android API reference, see Reference.
java.lang.Object | ||
↳ | android.service.wallpaper.WallpaperService.Engine | |
↳ | android.support.wearable.watchface.WatchFaceService.Engine |
Known Direct Subclasses |
The actual implementation of a watch face. You must implement
onCreateEngine()
to return your concrete Engine implementation.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns interruption filter selected by the user.
| |||||||||||
Returns the location of the first peeking card.
| |||||||||||
Returns the number of unread notification cards in the stream.
| |||||||||||
Returns whether the watch face is in ambient mode.
| |||||||||||
Called when the device enters or exits ambient mode.
| |||||||||||
Called when the user changes interruption filter.
| |||||||||||
Called when the first, peeking card positions itself on the screen.
| |||||||||||
Called when the properties of the device are determined.
| |||||||||||
Called periodically in ambient mode to update the time shown by the watch face.
| |||||||||||
Called when the number of unread notification cards in the stream has changed.
| |||||||||||
Called to inform you of the watch face becoming visible or hidden.
| |||||||||||
Sets the watch face style.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.service.wallpaper.WallpaperService.Engine
| |||||||||||
From class
java.lang.Object
|
Returns interruption filter selected by the user.
Returns the location of the first peeking card. This doesn't provide information about all movements of the card, only about its location when it's peeking at the bottom and allowing the watch face to be exposed.
Returns the number of unread notification cards in the stream.
Returns whether the watch face is in ambient mode. When true, the watch face should display in white on black.
Called when the device enters or exits ambient mode. The watch face should switch to a black and white display in ambient mode. If the watch face displays seconds, it should hide them in ambient mode.
Called when the user changes interruption filter. The watch face should adjust the
amount of information it displays. For example, if it displays the
number of pending emails, it should hide it if interruptionFilter is equal to INTERRUPTION_FILTER_NONE
. interruptionFilter
can be
INTERRUPTION_FILTER_NONE
, INTERRUPTION_FILTER_PRIORITY
or
INTERRUPTION_FILTER_ALL
.
Called when the first, peeking card positions itself on the screen. This is where the watch face can change its appearance depending on where the card is on the screen. This doesn't provide information about all movements of the card, only about its location when it's peeking at the bottom and allowing the watch face to be exposed.
Called when the properties of the device are determined. These include
PROPERTY_BURN_IN_PROTECTION
and PROPERTY_LOW_BIT_AMBIENT
.
properties | a bundle containing the hardware properties |
---|
Called periodically in ambient mode to update the time shown by the watch face. This method is called at least once per minute.
Called when the number of unread notification cards in the stream has changed.
count | number of the notification cards in the stream that haven't yet been seen by the user |
---|
Called to inform you of the watch face becoming visible or hidden. If you decide to
override this method, you must call super.onVisibilityChanged(visible)
as the first statement in your override.
Sets the watch face style. This affects how UI elements such as the battery indicator are
drawn on top of the watch face. Typically called in onCreate(SurfaceHolder)
but may be called
at any time, e.g. in response to the user changing the watch face configuration. Must be
called from the wallpaper thread.