From dcab4687db1be19367c8a83853876092f9aad767 Mon Sep 17 00:00:00 2001
From: Bert McMeen
- A complication is a feature of a watch face beyond hours and
- minutes. For example, a battery indicator is a complication.
+ A complication is any feature in a watch face that displays more than hours and
+ minutes. For example, a battery indicator is a complication. The
+ Complications API is for both watch faces and data provider apps.
- The Complications API is for both watch faces and data provider apps.
-
Watch faces can display extra information without needing code for
@@ -49,6 +55,36 @@ page.image=images/cards/card-n-sdk_2x.png
API.
+ Along with reviewing this page, download the Android Wear 2.0 Preview
+ Reference (see the Complications API additions) and review the Javadoc for complications.
+
+ Apps that provide data to watch faces for complications are called
+ "complication data providers." These apps are not responsible for controlling
+ how their data is rendered on the watch face.
+ This allows a watch face to integrate the data naturally with the
+ watch face design.
+ The consuming watch faces are responsible for drawing
+ the complications.
+
+ Watch faces can receive complication data of
+ various types (e.g. small text
+ data or icon data) and then display it.
+
+ As indicated in the diagram below, Android Wear mediates the flow of data
+ from providers to watch faces.
+
For creating or modifying watch faces, see Adding complications to a watch
@@ -60,33 +96,6 @@ page.image=images/cards/card-n-sdk_2x.png
"#exposing_data_to_complications">Exposing data to complications.
- Along with reviewing this page, download the Android Wear 2.0 Preview
- Reference and review the API additions in
- the Javadoc for complications.
-
- Apps that provide data to watch faces for complications are called
- "complication data providers." These apps lack control over how their
- data is rendered. The consuming watch faces are responsible for drawing
- the complications.
-
- As indicated in the diagram below, Android Wear mediates the flow of data
- from providers to watch faces.
-
- Through this process, watch faces can receive complication data of
- various types (e.g. small text
- data or icon data) and then display it.
-
The service's manifest entry should also include an
Include metadata to specify the supported types, update period, and
configuration action, if required; for details, download the Android Wear
2.0 Preview Reference and see the keys listed for the
-
Then create the configuration activity with an intent filter for that
action. The configuration activity must reside in the same package as the
- provider.
-
- The configuration activity must return
+
+ In this document
+
+ See Also
+
+
+
-
-
Adding Complications to a Watch Face
@@ -205,15 +214,17 @@ android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST
android:icon attribute. The provided icon should be a
- single-color white icon. This icon should represent the provider and will
- be shown in the provider chooser.
+ single-color white icon. Vector drawables are recommended for the icons.
+ An icon should represent the provider and will be shown in the provider
+ chooser.
ComplicationProviderService class (in the Javadoc).
+ ComplicationProviderService class (in the Javadoc; see
+ API Additions).
@@ -266,11 +277,7 @@ android.support.wearable.complications.UPDATE_PERIOD_SECONDS
RESULT_OK or
+ provider. The configuration activity must return RESULT_OK or
RESULT_CANCELED, to tell the system whether the provider
should be set.
- For details, download the Android Wear 2.0 Preview Reference, containing
- the Javadoc, and see the following in the
- ComplicationProviderService class:
+ For details, download the Android Wear 2.0 Preview Reference (see
+ API Additions), containing the Javadoc, and
+ see the following in the ComplicationProviderService class:
METADATA_KEY_PROVIDER_CONFIG_ACTION -+ +
+ The following shows examples of complication types: +
+
+