Google is committed to advancing racial equity for Black communities. See how.

Wear

Create applications for Wear OS by Google smartwatches.

This table lists all the artifacts in the androidx.wear group.

Artifact Current Stable Release Next Release Candidate Beta Release Alpha Release
wear 1.1.0 - - 1.2.0-alpha01
wear-input - - 1.0.0-beta01 -
wear-complications-data - - - 1.0.0-alpha01
wear-complications-provider - - - 1.0.0-alpha01
wear-watchface - - - 1.0.0-alpha01
wear-watchface-complications-rendering - - - 1.0.0-alpha01
wear-watchface-data - - - 1.0.0-alpha01
wear-watchface-style - - - 1.0.0-alpha01
This library was last updated on: October 28, 2020

Declaring dependencies

To add a dependency on Wear, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    implementation "androidx.wear:wear:1.1.0"

    implementation "androidx.wear:wear-input:1.0.0-beta01"
    implementation "androidx.wear:wear-input-testing:1.0.0-beta01"

    implementation "androidx.wear:wear-complications-data:1.0.0-alpha01"
    implementation "androidx.wear:wear-complications-provider:1.0.0-alpha01"

    implementation "androidx.wear:wear-watchface:1.0.0-alpha01"
    implementation "androidx.wear:wear-watchface-complications-rendering:1.0.0-alpha01"
    implementation "androidx.wear:wear-watchface-data:1.0.0-alpha01"
    implementation "androidx.wear:wear-watchface-style:1.0.0-alpha01"
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Wear Complications and Watchface 1.0.0

Version 1.0.0-alpha01

October 28, 2020

androidx.wear:wear-complications-*:1.0.0-alpha01 and androidx.wear:wear-watchface-*:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

API Changes

  • Removed some things we didn't intend to expose in public api. (I41669)
  • Create androidx.wear:wear-complications-provider library. (I77f1f)
  • ComplicationsUserStyleCategory the new recommended category for configuring complications (I96909)
  • Add wear-complication-data API. (I7c268)
  • Functions with boolean return values to be prefixed with “is” rather than “get” (If36ff)
  • API advice is to avoid using protected so this class has been refactored to take parameters in via the constructor. (I61644)
  • Rename setBackgroundComplication for clarity. (I96fe3)
  • Use Kotlin properties for ComplicationDrawable isHighlighted & data (I4dcc8)
  • Instead of ComplicationRenderer.InvalidateCallback we add Complication#invalidate() (I4f4c6)
  • These APIs are being deprecated in WearableSupport and are removed here. (Ib425c)
  • Renamed some WatchFace builder methods to emphasize their wear 2.0 legacy nature. (Idb775)
  • First beta API candidate for wear/wear-watchface (Id3981)
  • First tracked version of the API. (Ie9fe6)
  • Properly hiding ComplicationDrawable.BorderStyle IntDef and move to ComplicationStyle for consistency. (I27f7a)
  • Adding missing annotations for ComplicationStyle methods (I838fd)
  • This library has no public API surface (I88e2b)
  • All style category Option classes are now properly final. (Ib8323)
  • First tracked version of the API. (I27c85)

Bug Fixes

  • Changed ComplicationProviderService to have an explicit getComplicationPreviewData method. (I4905f)
  • API lint check for MissingGetterMatchingBuilder is enabled for androidx (I4bbea, b/138602561)
  • Rename wear-complications-rendering. (Ifea02)
  • Style category display names are now CharSequences (I28990)
  • Replacing Override with Overlay to match current themes & styles naming conventions. (I4fde9)
  • Renamed UserStyle#getOptions for clarity. (I695b6)

Version 1.2.0

Version 1.2.0-alpha01

October 28, 2020

androidx.wear:wear:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

New Features

  • Added WearCurvedTextView component for easily writing curved text following the curvature of the largest circle that can be inscribed in the view. An usage example:
<androidx.wear.widget.WearCurvedTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="example curved text"
        app:anchorAngleDegrees="180"
        app:anchorPosition="center"
        app:clockwise="false"
        style="@android:style/TextAppearance.Large"
/>

An example of curved text in Android Wear

  • Added WearArcLayout container for laying out its child elements one by one on an arc in either the clockwise or counterclockwise direction. Its children can be both standard android widget or "curved" widgets which implement its ArcLayoutWidget interface. An usage example:
<androidx.wear.widget.WearArcLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:anchorPosition="center">
      <ImageView
              android:layout_width="20dp"
              android:layout_height="20dp"
              android:src="@drawable/ic_launcher"
      />
      <androidx.wear.widget.WearCurvedTextView
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:text="Curved Text"
              style="@android:style/TextAppearance.Small"
              android:padding="2dp"
       />
  </androidx.wear.widget.WearArcLayout>

An example of arch text in Android Wear

(I536da)

Wear-Input 1.0.0

Version 1.0.0-beta01

October 28, 2020

androidx.wear:wear-input:1.0.0-beta01 and androidx.wear:wear-input-testing:1.0.0-beta01 are released with no changes since 1.1.0-alpha01. Version 1.0.0-beta01 contains these commits.

Wear-Input-Testing Version 1.0.0-alpha01

October 14, 2020

androidx.wear:wear-input-testing:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

API Changes

  • Added androidx.wear.input.test.TestWearableButtonsProvider which implements androidx.wear.input.WearableButtonsProvider to aid testing applications developed with androidx.wear:wear-input library. (I0ed0c)

Wear-Input Version 1.0.0-alpha01

September 2, 2020

androidx.wear:wear-input:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

New Features

Migration of WearableButtons functionality from Wearable Support Library to Jetpack. Additional testing support will be provided in androidx.wear:wear-input-testing library in the next Jetpack release.

Version 1.1.0

Version 1.1.0

October 14, 2020

androidx.wear:wear:1.1.0 is released. Version 1.1.0 contains these commits.

Major changes since 1.0.0

  • Added a layout_ prefix to boxedEdges attribute (now layout_BoxedEdges) for BoxInsetLayout in order to comply with android naming convention. This will remove the linter error in Android Studio for these attributes. (I4272f)
  • Added optional EXTRA_ANIMATION_DURATION_MILLIS to ConfirmationActivity to allow for the duration that the confirmation dialog is displayed. (adb83ce, b/143356547)
  • Updated WearableActionDrawViewto delay action drawer inflation until the drawer is opened for the first time. (I01026, b/163870541)

Version 1.1.0-rc03

September 2, 2020

androidx.wear:wear:1.1.0-rc03 is released. Version 1.1.0-rc03 contains these commits.

Bug Fixes

  • Fixed issue with Action Drawer not showing content when it is opened. (I01026, b/163870541)

Version 1.1.0-rc02

June 24, 2020

androidx.wear:wear:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.

Bug Fixes

  • Added a layout_ prefix to boxedEdges attribute (now layout_boxedEdges) for BoxInsetLayout in order to comply with android naming convention. This will remove the linter error in Android Studio for these attributes.

Version 1.1.0-rc01

May 14, 2020

androidx.wear:wear:1.1.0-rc01 is released with no changes since .1.0-beta01. Version 1.1.0-rc01 contains these commits.

Version 1.1.0-beta01

April 29, 2020

androidx.wear:wear:1.1.0-beta01 is released with no changes since androidx.wear:wear:1.1.0-alpha01. Version 1.3.0-beta01 contains these commits.

Version 1.1.0-alpha01

April 15, 2020

androidx.wear:wear:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • Added optional EXTRA_ANIMATION_DURATION_MILLIS to ConfirmationActivity to allow for the duration that the confirmation dialog is displayed. (adb83ce, 134523c, b/143356547)

Bug Fixes

  • Updated WearableActionDrawViewto delay action drawer inflation until the drawer is opened for the first time. (5cd32f7)