0

How can I provide several types of complications using only one complications provider? I want to achieve the same effect as "android wear" app does. They only have one provider and offer date, next event, photos, step counter, and others.

The documentation is still very poor, and I can't see anything where this is being talked about.

Thank you.

TofferJ
  • 4,678
  • 1
  • 37
  • 49
Fábio Carballo
  • 3,245
  • 5
  • 26
  • 36

2 Answers2

1

The first list that appears when you bring up the provider chooser is a list of apps. Clicking on an entry there brings up a list of complication providers included in that app.

Therefore 'Android Wear' contains 7+ complication providers, one for each type of data.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
0

There is not only one provider under the app "Android Wear", instead they are independent providers.

Each provider can support multiple types and the complication on watch face slide will determine which type is prefer to display.

For example, the "Next event" in android wear support "LONG_TEXT" and "SHOR_TEXT". If a complication slot in watch face prefer "SHORT_TEXT", the provider will send "SHOR_TEXT" complication data to the watch face.

So what you need to do is implemented one provider for each kind of data.

mengpq
  • 56
  • 6