diff --git a/docs/html/wear/preview/features/complications.jd b/docs/html/wear/preview/features/complications.jd index 155f7335e8ef6..a0157de10ffea 100644 --- a/docs/html/wear/preview/features/complications.jd +++ b/docs/html/wear/preview/features/complications.jd @@ -1,46 +1,52 @@ page.title=Watch Face Complications meta.keywords="wear-preview" page.tags="wear-preview" -page.image=images/cards/card-n-sdk_2x.png - +page.image=/wear/preview/images/complications-main-image.png @jd:body
- 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
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.
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
- ComplicationProviderService class (in the Javadoc).
+ ComplicationProviderService class (in the Javadoc; see
+ API Additions).
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 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: +
+
+
| + | Type | -+ | Required fields | -+ | Optional fields | -+ | Notes |
- IconShort title
+ Icon + Short title |
Exactly one of Icon/Short title is expected to be shown if either or @@ -382,37 +401,6 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION | -||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - LONG_TEXT - | -- Long text - | -- Long titleIcon*Small image - | -- Title is expected to be shown if provided. - | -||||||||||||||||||||||
| - RANGED_VALUE - | -- ValueMin valueMax value - | -- IconShort textShort title - | -- Optional fields are not guaranteed to be displayed. Uses include for - numerical data within bounds, such as for a percentage. - | -||||||||||||||||||||||
| ICON @@ -428,6 +416,42 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION | |||||||||||||||||||||||||
| + RANGED_VALUE + | +
+ Value + Min value + Max value + |
+
+ Icon + Short text + Short title + |
+ + Optional fields are not guaranteed to be displayed. + | +||||||||||||||||||||||
| + LONG_TEXT + | ++ Long text + | +
+ Long title + Icon + Small image + |
+ + Title is expected to be shown if provided. + | +||||||||||||||||||||||
SMALL_IMAGE
@@ -467,16 +491,16 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
- Examples of Complication Types --- The following shows examples of complication types: - - -
-
Using Fields for Complication Data@@ -543,10 +557,10 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
|