Skip to content

android/wear-os-samples

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2bd2418

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
September 28, 2023 06:26
August 12, 2021 14:44
September 24, 2019 09:51
September 20, 2023 11:17

Wear OS Samples Repository

This repository contains a set of individual Android Studio projects to help you get started writing Wear OS apps and watch faces.

Read below for a description of each sample.

Samples

  • AlwaysOnKotlin (Compose/Kotlin) - Demonstrates keeping the app visible in ambient mode. Note: While this is valuable for some specific use cases, most use cases won't need this, because when the watch goes into ambient mode (and shows watch face), if the user interacts with the watch again within several minutes, it will bring the app back up when it transitions out of ambient mode. Guide

  • ComposeStarter (Compose/Kotlin) - Demonstrates simple Compose for Wear OS app devs can use as a starting point for their own Compose app.

  • ComposeAdvanced (Compose/Kotlin) - Demonstrates an advanced Compose for Wear OS app devs can use to learn about the Wear Scaffold, Navigation, ScalingLazyColumn, CurvedText, and more.

  • DataLayer (Compose/Kotlin) - Demonstrates communicating via the data layer between the watch and the phone. Guide

  • RuntimePermissionsWear (Kotlin) - Demonstrates requesting permissions not only on a Wear OS device and a mobile device, but also across devices, e.g., request permissions on a mobile device from your wear device and the other way around. Note: It does require you having both the Wear and Mobile version of the app installed on both devices. Guide

  • WatchFaceFormat - Demos the new Watch Face Format which allows quick development of performant watch faces in XML Guide

  • WatchFaceKotlin (Kotlin) - Demos the AndroidX Watch Face APIs which provide their own storage mechanism for watch face preference values.

  • WearAccessibilityApp (Java) - Sample demonstrates how to include accessibility support for your wearable app. Guide

  • WearComplicationDataSourcesTestSuite (Kotlin) - If you are writing a watch face with complications, this app gives you a full suite of data sources to test against your implementation of complications to make sure it looks good. Complication Guide

  • WearOAuth (Kotlin) - Demonstrates how developers can authenticate a user on their Wear OS app via the user's mobile/phone device without requiring a mobile app (Wear OS companion app handles the request on the mobile side). The sample uses OAuth. Guide

  • WearSpeakerSample (Compose/Kotlin) - Demonstrates audio recording and playback if the wearable device has a speaker. This is also an advanced Compose sample, handling permissions, use of effects, animations and ConstraintLayout for Compose. Guide

  • WearStandaloneGoogleSignIn (Compose/Kotlin) - Demonstrates using Google sign-in to authenticate user. Guide

  • WearTilesKotlin (Kotlin) - Demonstrates tiles using the new AndroidX library. Guide

  • WearVerifyRemoteApp (Kotlin) - Verify and open your app on another device, and if it isn't installed, open the store listing to allow the user to install it (wear or mobile). Guide

About

Multiple samples showing best practices in app and watch face development on Wear OS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published