Complication not responding on .setAmbientImage when in ambient mode

I am developing a wearos app where I use Small Icon complication type as a data source type. There is this function where you can set an image during watch face ambient mode, .setAmbientImage. The image set on ambient mode is monochrome image. On the watch face, when the complication data source is set and during ambient mode, the image of the complication does not update to ambient mode image. Is there a fix where the complication on watch face updates during ambient mode?

Good question. I think it’s actually up to the watchface to determine which image to display, and a lot of watchface developers don’t bother with ambient images.

I developed a watchface that (from memory!) uses ambient images if available, and displays no icons in AOD if an ambient image isn’t available. It’s free; see if it works with your complication. If it does, you know that the issue is with naughty watchfaces rather than with your app.

Your watchface seems to work on my complication, but there is something on the size of the image changing during ambient mode.

You actually made me look at my code! As I thought, it’s functioning as intended. To keep within the AOD limit of 20%, I had to shrink a few elements. The image should shrink to 70% of interactive size when in AOD, even when using an ambient image. This isn’t necessary in most cases, but I designed for the worst case.

Aside: I think my interpretation of AOD was wrong, and I could probably have displayed much more. Trying that is on my to-do list.

tl;dr: it seems like your app complication is working perfectly.

Just curious, did you create your watchface using WFF in android studio? Or using Watch Face Studio? I also tried using the complication on watch face created on WFS but it seems .setAmbientImage is not supported. While on trying WFF xml implementation, the ambient image is displayed.

Good point. After roughing it out on WFS, I used WFF XML. WFS doesn’t expose the AMBIENT tag, but then I don’t think it exposes any complication-specific tags; eg, RANGED_VALUE_VALUE. It obviously uses some of those tags internally, but I don’t know about AMBIENT. You’d have to break open a published WFS project and inspect the generated watchface.xml to see exactly what it’s doing.