1

I'm working on a watch face for Wear OS based on this example: https://github.com/android/wear-os-samples/tree/main/WatchFaceKotlin.
Samsung Heart Rate complication has a MONOCHROMATIC_IMAGE type and it doesn't provide heart rate value.
I already know how to get this value form SHealth. I'd like to change this complication type to SHORT_TEXT and set HR value programmatically. Is it possible?
Also I know how to make my own complication data provider, but it's a separate service that appears in the list of all available complication providers.

OlegMalakhov
  • 53
  • 1
  • 6

1 Answers1

0

Yes. Modify the type of complications in ComplicationUtils.kt.

Note:The top type which you declare is the top preference. You want SHORT_TEXT, put the SHORT_TEXT on the top of the list

https://github.com/android/wear-os-samples/blob/a49c45cecd01d169f7e863b3f99f2f74aea02fec/WatchFaceKotlin/app/src/main/java/com/example/android/wearable/alpha/utils/ComplicationUtils.kt#L56-L64

    object Left : ComplicationConfig(
        LEFT_COMPLICATION_ID,
        listOf(
            ComplicationType.RANGED_VALUE,
            ComplicationType.MONOCHROMATIC_IMAGE,
            ComplicationType.SHORT_TEXT,
            ComplicationType.SMALL_IMAGE
        )
    )
Yuri Schimke
  • 12,435
  • 3
  • 35
  • 69
Null
  • 1
  • 1