Google Wear OS watch faces and applications
development
Oleksandr Stepanov

Mobile Lead @ AKQA
Who am I
in/oleksandr-stepanov
oleksandr.stepanov@armind.it
Mobile Lead
Android platforms
Wear OS
(ex Android Wear)
Wear OS devices
• 40+ model of watches in sale

• 200+ watches released so far

• 6000+ number of Wear OS apps
in Play Store
Screen dimensions
• 240x240 … 480x480

• 400x400 - 24%

• 390x390 - 20%

• Better to use Vector, e.g. SVG
Screen shape
11%
89%
“chin”
Application type
Standalone apps Watch face
Watch face
android.app.Service
android.service.wallpaper.WallpaperService
android.support.wearable.watchface.WatchFaceService
CanvasWatchFaceService Gles2WatchFaceService
Watch face Engine
android.service.wallpaper.WallpaperService.Engine
android.support.wearable.watchface.WatchFaceService.Engine
CanvasWatchFaceService.Engine Gles2WatchFaceService.Engine
Custom watch face
• class CustomWatchFaceService: CanvasWatchFaceService()
• inner class Engine : CanvasWatchFaceService.Engine()
• Override:
• onCreate(…)
• onPropertiesChanged(…)
• onTimeTick()
• onAmbientModeChanged(…)
• onDraw(…)
• onVisibilityChanged(visible: Boolean)
Custom watch face
<service
android:name=".AnalogWatchFaceService"
android:label="@string/analog_name"
android:permission="android.permission.BIND_WALLPAPER" >
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/watch_face" />
<meta-data
android:name="com.google.android.wearable.watchface.preview"
android:resource="@drawable/preview_analog" />
<meta-data
android:name="com.google.android.wearable.watchface.preview_circular"
android:resource="@drawable/preview_analog_circular" />
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
<category
android:name=
"com.google.android.wearable.watchface.category.WATCH_FACE" />
</intent-filter>
</service>
Custom watch face
Complications
Data
Provider
Wear
System
Watch

Face
ComplicationDataComplicationData
Update request
Complications
Proper Architecture
• MVVM or MVP

• RxJava/RxKotlin

• Architecture Components not available

• Custom technical design
Standalone apps
Standalone apps
android.app.Activity
android.support.wearable.activity.WearableActivity
Standalone apps
<manifest>
...
<uses-feature android:name="android.hardware.type.watch" />
...
<application>
...
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />
...
</application>
</manifest>
Standalone apps
• class CustomWearableActivity: WearableActivity()
• Standard Activity lifecycle
• Ambient mode addition
• boolean isAmbient()
• void onEnterAmbient(Bundle ambientDetails)
• void onExitAmbient()
• void onUpdateAmbient()
• void setAmbientEnabled()
Demo
Ambient mode
Burn-in protection
• OLED and AMOLED screens

• EXTRA_BURN_IN_PROTECTION flag
in onEnterAmbient(…)
• Avoid having solid blobs
16x16 size in ambient
• Avoid placing elements or
frame on the edge
Ambient mode
Burn-in protection
Off On
Low-bit Ambient mode
• EXTRA_LOWBIT_AMBIENT flag in
onEnterAmbient(…)
• When on, only few colors
available in ambient mode
• Anti-aliasing must be
disabled
Connected app
on handheld
phone or tablet
Wear OS app on phone
• Wear OS watch must be paired
with phone

• Pairing happens through Wear
OS app

• Android & iOS versions available

• Watch is connected via BLE
Connected app
• Applications shares package
name

• Distributed in one app on Play
Store 

• … but in separate APKs

• Play Store on the watch and
phone downloads own package.
Connected app API
• Data Layer API

• DataClient

• DataMap <—> DataMapItem <—> DataItem

• MessageClient

• Only for connected nodes

• <100k of data

• ChannelClient

• Transfer data using streams

• Media data
Connected app API
Handheld statistic
2 out of 3 1 out of 3
iOS Connected app API
Data Layer API
iOS Connected app API
iOS Connected app API
Central Peripheral
iOS Connected app API
• BLE 4.0 Services & Characteristics (GATT)

• BLE 4.1 L2CAP Connection-oriented Channels

✓ iOS since 11 version

– Android announced in Q
iOS Connected app API
iOS Connected app API
• Firestore Database

• Realtime Database

• Cloud Storage

• Cloud Messaging (push notifications)
!
Bonus
!
Limited edition
Wear OS LE
⛔ Google Play Store

‣ Huawei and Mobvoi

⛔ Firebase

⛔ Google Authentication

⛔ Google Play Services version 10.2.0
Wear OS LE
• Wearable API via GoogleApiClient

• Data Layer API

• FusedLocationProvider

• Google Fit limited support
Thank you !

Google Wear OS watch faces and applications development - UA Mobile 2019