On this page
Users interact with a watch for a few seconds at a time. The best Wear OS experiences surface information through tiles and complications, and use the full app only for short, focused tasks.
Wear OS surfaces
Project setup
Create a Wear OS module in Android Studio (New Module โ Wear OS). Use the Wear Compose libraries (Material 3 for Wear OS is recommended for new apps) and declare the watch feature:
<uses-feature android:name="android.hardware.type.watch" />
<application>
<!-- true = works without a phone app installed -->
<meta-data android:name="com.google.android.wearable.standalone" android:value="true" />
</application>Compose for Wear OS
Wear Compose provides watch-specific components: scrolling lists that scale items near the edges, time text, round-friendly buttons and rotary input support.
@Composable
fun WorkoutList(workouts: List<Workout>, onSelect: (Workout) -> Unit) {
val listState = rememberTransformingLazyColumnState()
AppScaffold {
ScreenScaffold(scrollState = listState) { contentPadding ->
TransformingLazyColumn(state = listState, contentPadding = contentPadding) {
item { ListHeader { Text("Workouts") } }
items(workouts) { workout ->
Button(
onClick = { onSelect(workout) },
label = { Text(workout.name) },
modifier = Modifier.fillMaxWidth(),
)
}
}
}
}
}Component names differ between Wear Compose Material and Material 3 versions (for example ScalingLazyColumn vs TransformingLazyColumn). Follow the docs for the version you use.
Tiles and complications
- Tiles: implemented with a
TileServiceand the ProtoLayout library. Show key data and one or two actions. Keep updates efficient. - Complications: provide data to watch faces through a
ComplicationDataSourceService(short text, ranged value, icon and so on).
Syncing with the phone
Use the Wearable Data Layer API: DataClient for synced state, MessageClient for one-off messages, and ChannelClient for large transfers. Standalone apps can also use the network directly (Wi-Fi/LTE, or proxied through the phone).
suspend fun sendToPhone(context: Context, path: String, payload: ByteArray) {
val nodes = Wearable.getNodeClient(context).connectedNodes.await()
nodes.forEach { node ->
Wearable.getMessageClient(context).sendMessage(node.id, path, payload).await()
}
}Health and fitness
Use Health Services on Wear OS for heart rate, exercise tracking and passive data. It manages sensors efficiently. Request the relevant permissions, and run exercises with the exercise client so tracking survives the app going to the background.
Battery and performance
- Avoid keeping the screen on. Support ambient mode for ongoing activities.
- Batch network calls, and prefer syncing via the phone.
- Use ongoing activities for workouts, so users can return quickly.
Testing
Use round and square Wear OS emulators, test rotary input, and test on a real watch for performance and sensor behaviour. Compose previews support Wear device configurations.
Use cases
Fitness tracking
Health Services + ongoing activity + tile showing today's progress.
Quick actions
Smart home toggles or timers from a tile.
Companion data
Next calendar event or delivery status as a complication.
Frequently asked questions
Can I reuse my phone app's Compose UI?
You can share ViewModels and data layers, but UI should be designed for the watch using Wear Compose components.
Does a Wear OS app need a phone app?
No. Standalone apps are supported and recommended where possible.
Conclusion
Build for glances: complications and tiles first, then a focused app with Compose for Wear OS, the Data Layer for phone sync, Health Services for fitness, and careful battery use.
Next step: build for the car with Android Auto and Android Automotive OS.
Official references
๐ฑ Apps built by Yunok Tech
Real Android apps on Google Play, free to download.
Walzi4K wallpapers for lock and home screenGet it โธ
NotiVaultNotification history: recover dismissed notificationsGet it โธ
Ready to build real Android applications?
Jetpack Compose clicks once you build real screens with real state. Practise modern Android UI development on projects that go beyond toy examples.
Move beyond theory and strengthen your Android development skills with Yunoktech's Android course. Learn core concepts, practical implementation, modern Android development techniques, and the reasoning behind building maintainable applications.
Explore the Android course and take your next step as an Android developer.