The CanvasWatchFaceService class and registering your watch face
Watch faces are services with and visual rendering ability; all watch faces will extend the CanvasWatchFaceService
class. The CanvasWatchFaceService
class extracts its functionalities from the WallpaperSevice
and WallpaperService.Engine
classes. The Engine
class, with its methods, helps the watch face with its lifecycle. If you have to make a watch face for an Android Wear, you should use the CanvasWatchfaceService
class instead of plain old vanilla WallpaperService
. A watch face service, like a wallpaper service, must implement only the onCreateEngine()
method. Watch face engines need to implement the method onTimeTick()
to refresh the time and refresh the view and onAmbientModeChanged(boolean)
to switch between different version of watch faces, such as the grey mode and colorful watch face. Watch face engines in a like manner implement onInterruptionFilterChanged(int)
to update the view dependent upon how much information...