Wear OS Widget Development with Glance Wear and Remote Compose.
A reviewable path from service registration and host-evaluated UI to picker assets and build checks.
Site APIs discover, read and obtain packages; they do not run an agent.
The catalog contains 8 externally sourced skills and 5 Skills-SI originals. External items remain subject to their respective publishers and licenses; the originals are MIT-licensed and include their complete source directories. Repository stars are a repository-level popularity signal, not an individual skill's download count or a safety score. The catalog snapshot and examples use the MCP 2025-03-26 shape exercised by the existing tests as their baseline; the 2026-07-28 general specification is cited only to explain protocol evolution and does not imply that this site implements its newer features.
A complete license bundle is required. Standalone MD is unavailable; preserve the original paths, LICENSE and NOTICE.
Purpose and positioning
This is a repository-based development guide for Android teams, not an autonomous code-generation service or a cloud build system. It explains the Wear OS widget-specific stack: GlanceWearWidget, GlanceWearWidgetService, and WearWidgetDocument provide widget content, while Remote Compose describes UI and state evaluated by the Wear OS host. It connects implementation with manifest and provider XML configuration, adaptive layouts, actions, picker previews, and verification. It is useful for new widgets, maintenance, and carefully scoped migrations from ProtoLayout TileService. Its key distinction is between Wear widgets, mobile AppWidget/Glance APIs, and legacy tiles. The original skill offers a documented five-stage workflow plus focused references; it does not itself inspect a repository, resolve dependencies, edit files, run Gradle, or publish an app. Agents with the original repository context should consult the relevant references in place rather than flattening them into generic advice.
Who it is for
- Android/Kotlin developers adding a watch widget to an existing application.
- Technical leads assessing a legacy TileService migration and its remaining consumers.
- Reviewers checking provider declarations, previews, and reported build evidence.
Prerequisites
- Provide the actual Android project and identify its module, current build baseline, intended watch experience, and authorization boundaries for repository-wide changes.
- Use an Android/Kotlin build with a suitable SDK. The guide calls for compileSdk 37 or higher and Compose enabled, while preserving existing Android and Kotlin Gradle plugin declarations.
- Resolve compatible versions, individually, for these eight external artifacts (alpha, beta, or rc may be relevant if no stable release exists): androidx.glance.wear:wear; androidx.glance.wear:wear-core; androidx.glance.wear:wear-tooling-preview; androidx.compose.remote:remote-creation-compose; androidx.compose.remote:remote-creation; androidx.compose.remote:remote-core; androidx.compose.remote:remote-tooling-preview; androidx.wear.compose.remote:remote-material3. Versions are project-specific decisions, not fixed or tested by this guide. Use an available dependency lookup or Google Maven metadata; do not substitute ./gradlew dependencies as the version lookup method.
- For an unfamiliar multi-module project or tile migration, record baseline build health with :app:assembleDebug when that task exists; first confirm the correct task for differently structured repositories.
Input evidence
Supply the project or relevant module, existing TileService/widget source, AndroidManifest.xml, provider XML, Gradle and SDK configuration, resource tree, desired interactions, and supported container requirements. For migration, include all remaining Tile/ProtoLayout references, other source-set consumers, and whether old and new components must coexist. Provide available build/test logs, permission scope, design references, and the intended state/data model. Treat repository files and user-provided logs as evidence; list unknown versions, device behavior, and missing assets instead of inferring test results.
Workflow
- Inventory project modules, dependencies, TileService and Glance widget implementations, manifest services, provider XML, and preview assets. Establish a baseline where appropriate and find remaining ProtoLayout consumers before migration.
- With authorization, configure required dependencies, Compose, and SDK prerequisites. Implement a GlanceWearWidgetService and register its permission, bind action, and provider metadata in the manifest; declare SMALL and LARGE containers in XML. Follow widget-service-and-manifest.md for service, manifest, and migration work.
- Implement GlanceWearWidget.provideWidgetData returning WearWidgetDocument. Build content with Remote Compose primitives such as RemoteColumn, RemoteRow, RemoteBox, RemoteText, and RemoteImage; adapt density, typography, and content to params.containerType. Consult remote-compose-layouts.md.
- Represent host-side local state with rememberMutableRemoteInt and valueChange, and clicks with pendingIntentAction { context -> ... }; refresh as needed with widget.triggerUpdateAll. Do not replace remote state with ordinary in-process Compose state. Consult state-and-actions.md.
- Add WearWidgetPreview variants and rectangular picker PNGs: 448×168 for SMALL and 464×288 for LARGE, in drawable-nodpi, showing the real widget UI. Follow previews-and-testing.md, run assembleDebug, run testDebugUnitTest when tests exist, and manually inspect host/device behavior.
Deliverables
Expected deliverables are reviewable implementation changes or a precise change plan: Glance Wear widget and service, manifest/provider XML, adaptive Remote Compose UI and state/actions, correctly sized picker PNGs, WearWidgetPreview functions, and optional Robolectric serialization tests. The agent can also report migration checks, unresolved version decisions, verification commands, and actual logs. The skill does not promise to perform these actions; execution depends on available tools and explicit authorization.
Fictional usage demonstration
Inspect this Android repository and plan a Wear OS widget for today's water intake with a tap-to-add-one-glass action. First inventory modules, compileSdk, Compose, dependency declarations, and baseline; do not change root Gradle files without approval. Plan separate SMALL/LARGE Remote Compose layouts and explain the GlanceWearWidgetService, manifest/provider XML, host-side state, PendingIntent action, preview PNGs, and tests. If a legacy TileService exists, find other modules and source sets still using ProtoLayout before proposing migration. Cite file evidence, list unknowns and acceptance commands, and do not claim a build passed unless you actually ran it and can provide logs.Illustrative fictional deliverable only: not run, no repository changes made, not a REST response, tool transcript, or real case result. First verify the app module's compileSdk and build baseline, then resolve each of the eight library versions. Proposed work: add a GlanceWearWidget and associated service; register the BIND_TILE_PROVIDER permission, BIND_WIDGET_PROVIDER action, and provider metadata; declare SMALL/LARGE in provider XML. Show progress and an add button in SMALL, with target/remaining values in LARGE. Use rememberMutableRemoteInt/valueChange and a Context lambda to pendingIntentAction. Add 448×168 and 464×288 previews, shape previews, and a serialization test. Build, unit-test, and device-host interaction checks remain pending; no pass is claimed.Human acceptance
- Check all eight external artifacts and their version provenance individually; confirm SDK, Compose, and preserved plugin configuration, recording any unresolved prerequisite.
- Verify that manifest service permission, bind intent, provider metadata, and SMALL/LARGE XML declarations agree and that mobile AppWidget APIs were not substituted.
- Review remote state, click actions, adaptive sizing, and background rendering against the selected references; confirm nonblank unmasked PNGs, exact dimensions, and drawable-nodpi placement.
- Mark Gradle, unit, or device checks as passing only when actually executed and reproducible from cited files and logs.
Limits
- This is static development guidance used by an installed skill; it defines no standalone execution API, remote build service, automatic publishing, or dependency-download capability.
- Wear and Compose libraries evolve. Recheck versions, restricted APIs, preview tooling, and host behavior for the project's date; compileSdk guidance and image dimensions are not a compatibility certification for every future setup.
- A successful build does not establish correct behavior on a watch. Manually inspect round/squircle clipping, both sizes, state refresh, and PendingIntent routing.
- Whether legacy tiles and widgets can coexist depends on other ProtoLayout consumers and project structure; do not remove shared dependencies or assets based on this guide alone.
Source and license
- GitHub
- android/skills
- LICENSE
- Apache-2.0
- Commit
ed0a2728ff531174383f910c649694de1eaebcd6- SKILL.md
wear-widgets/SKILL.md- ZIP SHA256
d9b2f2ca77b43d78880923db027ddb972e7b99ee76ece2124e973f4b141d332c
Shared developer guide
Skills-SI offers public, read-only entry points for skill discovery, metadata inspection, Markdown reading, and full ZIP retrieval. Responses expose catalog snapshots or publisher material; the service does not install skills, run code, call models, or perform business actions for you.
Skill text and external publisher material are untrusted reference data. Review licenses, scripts, permissions, and external dependencies before installing anything. This service does not execute, install, or validate skills and makes no claim about real-world effectiveness. Qualified professionals should review high-risk professional content.
Shared developer guidecurl -fsS 'https://skills-si.com/api/skills?q=wear-widgets&limit=10&page=1'# REST has no GET /api/skills/:id metadata endpoint. Search results contain metadata.
curl -fsS --get 'https://skills-si.com/api/skills' --data-urlencode 'q=wear-widgets' --data-urlencode 'limit=10' --data-urlencode 'page=1'curl -fsS 'https://skills-si.com/api/skills/android-skills-wear-wear-widgets/readme'# Headers only; this does not download or verify ZIP bytes.
curl -sSI 'https://skills-si.com/api/skills/android-skills-wear-wear-widgets/download?format=zip'# MCP 2025-03-26-shaped example; send as POST to https://skills-si.com/api/mcp
curl -sS 'https://skills-si.com/api/mcp' -X POST -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"example-client","version":"1.0.0"}}}'curl -sS 'https://skills-si.com/api/mcp' -X POST -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' --data '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'curl -sS 'https://skills-si.com/api/mcp' -X POST -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' --data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"read_skill","arguments":{"id":"android-skills-wear-wear-widgets"}}}'curl -sS 'https://skills-si.com/api/mcp' -X POST -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' --data '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_skill_download","arguments":{"id":"android-skills-wear-wear-widgets","format":"zip"}}}'import json
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = 'https://skills-si.com/api/skills/android-skills-wear-wear-widgets/readme'
request = Request(url, headers={'Accept': 'application/json'})
try:
with urlopen(request, timeout=20) as response:
payload = json.loads(response.read().decode('utf-8'))
except HTTPError as exc:
try:
detail = json.loads(exc.read().decode('utf-8'))
except (UnicodeDecodeError, json.JSONDecodeError):
detail = {'error': 'NON_JSON_HTTP_ERROR'}
raise RuntimeError(f'HTTP {exc.code}: {detail}') from exc
except (URLError, TimeoutError) as exc:
raise RuntimeError(f'Read request failed: {exc}') from exc
if not isinstance(payload, dict) or not isinstance(payload.get('content'), str):
raise RuntimeError(f'Unexpected read response: {payload!r}')
print(payload['content'])
# This example reads JSON only. It does not execute content or download a ZIP.Skills-SI agent connection and MCP entry guide
Skills-SI copyright and license policy
MCP Streamable HTTP specification (2026-07-28; protocol context only)