0

I want to create watch face complication which will use data from my data provider project. I want to display it in a widget on the Watch Face in a way, so user can see some data from my app on tha Watch Face and then tap on the widget (complication) to change the data without moving inside the app. Does it possible? Or after the tap user always will be moved inside my app?

Now I only see the option to create a complication with App Shortcut and App Shortcut as I know will always move user inside the app. Correct me if I'm wrong

Dev
  • 1
  • 1

1 Answers1

0

Yes, it should be possible. It's not necessarily recommended, since it breaks the regular interaction pattern, but here is how it could be done:

All complication types support a tap action in the form of a PendingIntent. See the ComplicationData constructor here. This intent will be sent when the user taps on your complication on the watch face.

You would have to create a PendingIntent for the tap action that can trigger your ComplicationProviderService to refresh its data.

Just note that you can't change the complication type, so all the different states of your complication would have to conform to the limitations of a single complication type (e.g. SHORT_TEXT, RANGED_VALUE, etc).

TofferJ
  • 4,678
  • 1
  • 37
  • 49