# android/wear-os-samples architecture

> Architecture diagram of the GitHub repository android/wear-os-samples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/android/wear-os-samples
- Repository: https://github.com/android/wear-os-samples

## Overview

This repository is a collection of independent Wear OS starter and feature samples, not one integrated application. The principal workflow is a developer choosing a sample and using its demonstrated capability as a starting point. The README documents the main capabilities, including watch–phone communication, watch faces, authentication, audio, tiles, complications, push, and widgets. Source excerpts are limited to build configuration and a token-generation task, so runtime internals and most component-to-component links cannot be verified; paths for unsampled samples identify their directories.

Main entry points: [`ComposeStarter`](https://github.com/android/wear-os-samples/tree/main/ComposeStarter) (Compose starter), [`DataLayer`](https://github.com/android/wear-os-samples/tree/main/DataLayer) (Data Layer sample), [`WearOAuth`](https://github.com/android/wear-os-samples/tree/main/WearOAuth) (Wear OAuth sample), [`WatchFaceFormat`](https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat) (Watch Face Format)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_starters["App starters"]
  node_compose["Compose starter"]
  node_compose_app["Starter app"]
end

subgraph group_connectivity["Device communication"]
  node_data_layer["Data Layer sample"]
  node_watch_phone["Watch–phone messaging"]
  node_oauth["Wear OAuth sample"]
  node_oauth_flow["OAuth authentication"]
end

subgraph group_watchfaces["Watch faces"]
  node_wff["Watch Face Format"]
  node_xml_faces["XML watch faces"]
  node_complications["Complications sample"]
  node_data_sources["Complication data sources"]
  node_push["Watch Face Push"]
  node_push_library["Push capability"]
end

subgraph group_experiences["Wear experiences"]
  node_tiles["Tiles sample"]
  node_tile_ui["AndroidX tiles"]
  node_widgets["Wear Widgets sample"]
  node_remote_widgets["Remote Compose widgets"]
  node_speaker["Speaker sample"]
  node_audio["Audio recording and playback"]
end

node_developer(("Wear OS developer"))
node_phone_companion["Wear OS companion"]

node_developer -->|"chooses sample"| node_compose
node_compose -->|"starts app development"| node_compose_app
node_developer -->|"chooses sample"| node_data_layer
node_data_layer -->|"demonstrates messaging"| node_watch_phone
node_developer -->|"chooses sample"| node_oauth
node_oauth -->|"requests authentication"| node_phone_companion
node_phone_companion -->|"handles OAuth request"| node_oauth_flow
node_developer -->|"chooses sample"| node_wff
node_wff -->|"demonstrates format"| node_xml_faces
node_developer -->|"chooses sample"| node_complications
node_complications -->|"provides test sources"| node_data_sources
node_developer -->|"chooses sample"| node_push
node_push -->|"demonstrates library"| node_push_library
node_developer -->|"chooses sample"| node_tiles
node_tiles -->|"demonstrates tiles"| node_tile_ui
node_developer -->|"chooses sample"| node_widgets
node_widgets -->|"demonstrates widgets"| node_remote_widgets
node_developer -->|"chooses sample"| node_speaker
node_speaker -->|"demonstrates audio"| node_audio

click node_compose "https://github.com/android/wear-os-samples/tree/main/ComposeStarter"
click node_compose_app "https://github.com/android/wear-os-samples/tree/main/ComposeStarter/app"
click node_data_layer "https://github.com/android/wear-os-samples/tree/main/DataLayer"
click node_watch_phone "https://github.com/android/wear-os-samples/tree/main/DataLayer"
click node_oauth "https://github.com/android/wear-os-samples/tree/main/WearOAuth"
click node_oauth_flow "https://github.com/android/wear-os-samples/tree/main/WearOAuth"
click node_wff "https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat"
click node_xml_faces "https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat"
click node_complications "https://github.com/android/wear-os-samples/tree/main/Complications"
click node_data_sources "https://github.com/android/wear-os-samples/tree/main/Complications"
click node_push "https://github.com/android/wear-os-samples/tree/main/WatchFacePush"
click node_push_library "https://github.com/android/wear-os-samples/tree/main/WatchFacePush"
click node_tiles "https://github.com/android/wear-os-samples/tree/main/WearTilesKotlin"
click node_tile_ui "https://github.com/android/wear-os-samples/tree/main/WearTilesKotlin"
click node_widgets "https://github.com/android/wear-os-samples/tree/main/WearWidget"
click node_remote_widgets "https://github.com/android/wear-os-samples/tree/main/WearWidget"
click node_speaker "https://github.com/android/wear-os-samples/tree/main/WearSpeakerSample"
click node_audio "https://github.com/android/wear-os-samples/tree/main/WearSpeakerSample"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_compose,node_compose_app toneBlue
class node_data_layer,node_watch_phone,node_oauth,node_oauth_flow toneAmber
class node_wff,node_xml_faces,node_complications,node_data_sources,node_push,node_push_library toneMint
class node_tiles,node_tile_ui,node_widgets,node_remote_widgets,node_speaker,node_audio toneRose
class node_developer,node_phone_companion toneIndigo
```

## Components

### App starters

- [Compose starter](https://github.com/android/wear-os-samples/tree/main/ComposeStarter): `ComposeStarter`
- [Starter app](https://github.com/android/wear-os-samples/tree/main/ComposeStarter/app): `ComposeStarter/app`

### Device communication

- [Data Layer sample](https://github.com/android/wear-os-samples/tree/main/DataLayer): `DataLayer`
- [Watch–phone messaging](https://github.com/android/wear-os-samples/tree/main/DataLayer): `DataLayer`
- [Wear OAuth sample](https://github.com/android/wear-os-samples/tree/main/WearOAuth): `WearOAuth`
- [OAuth authentication](https://github.com/android/wear-os-samples/tree/main/WearOAuth): `WearOAuth`

### Watch faces

- [Watch Face Format](https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat): `WatchFaceFormat`
- [XML watch faces](https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat): `WatchFaceFormat`
- [Complications sample](https://github.com/android/wear-os-samples/tree/main/Complications): `Complications`
- [Complication data sources](https://github.com/android/wear-os-samples/tree/main/Complications): `Complications`
- [Watch Face Push](https://github.com/android/wear-os-samples/tree/main/WatchFacePush): `WatchFacePush`
- [Push capability](https://github.com/android/wear-os-samples/tree/main/WatchFacePush): `WatchFacePush`

### Wear experiences

- [Tiles sample](https://github.com/android/wear-os-samples/tree/main/WearTilesKotlin): `WearTilesKotlin`
- [AndroidX tiles](https://github.com/android/wear-os-samples/tree/main/WearTilesKotlin): `WearTilesKotlin`
- [Wear Widgets sample](https://github.com/android/wear-os-samples/tree/main/WearWidget): `WearWidget`
- [Remote Compose widgets](https://github.com/android/wear-os-samples/tree/main/WearWidget): `WearWidget`
- [Speaker sample](https://github.com/android/wear-os-samples/tree/main/WearSpeakerSample): `WearSpeakerSample`
- [Audio recording and playback](https://github.com/android/wear-os-samples/tree/main/WearSpeakerSample): `WearSpeakerSample`

### Other components

- **Wear OS developer**
- **Wear OS companion**

## Connections

- Wear OS developer → Compose starter: chooses sample (evidence: `README.md`)
- Compose starter → Starter app: starts app development (evidence: `README.md`)
- Wear OS developer → Data Layer sample: chooses sample (evidence: `README.md`)
- Data Layer sample → Watch–phone messaging: demonstrates messaging (evidence: `README.md`)
- Wear OS developer → Wear OAuth sample: chooses sample (evidence: `README.md`)
- Wear OAuth sample → Wear OS companion: requests authentication (evidence: `README.md`)
- Wear OS companion → OAuth authentication: handles OAuth request (evidence: `README.md`)
- Wear OS developer → Watch Face Format: chooses sample (evidence: `README.md`)
- Watch Face Format → XML watch faces: demonstrates format (evidence: `README.md`)
- Wear OS developer → Complications sample: chooses sample (evidence: `README.md`)
- Complications sample → Complication data sources: provides test sources (evidence: `README.md`)
- Wear OS developer → Watch Face Push: chooses sample (evidence: `README.md`)
- Watch Face Push → Push capability: demonstrates library (evidence: `README.md`)
- Wear OS developer → Tiles sample: chooses sample (evidence: `README.md`)
- Tiles sample → AndroidX tiles: demonstrates tiles (evidence: `README.md`)
- Wear OS developer → Wear Widgets sample: chooses sample (evidence: `README.md`)
- Wear Widgets sample → Remote Compose widgets: demonstrates widgets (evidence: `README.md`)
- Wear OS developer → Speaker sample: chooses sample (evidence: `README.md`)
- Speaker sample → Audio recording and playback: demonstrates audio (evidence: `README.md`)
