The following code in my app
var comp = { :value => value, :shortLabel => "TESLA", :longLabel => "TESLA-LINK", :units => "%", }; try { Complications.updateComplication(0, comp); } catch (e) { /*DEBUG*/ logMessage("Error sending Complication!"); }
Used to sent a custom complication to my watch face and received by this following watch face code snippet
function onComplicationUpdated(complicationId) { var complication = Complications.getComplication(complicationId); var complicationType = complication.getType(); var complicationShortLabel = complication.shortLabel; var complicationValue = complication.value; /*DEBUG*/ var complicationLongLabel = complication.longLabel; logMessage("Type: " + complicationType + " short label: " + complicationShortLabel + " long label: " + complicationLongLabel + " Value:" + complicationValue); if (gTeslaComplication == true && complicationType == Complications.COMPLICATION_TYPE_INVALID && complicationShortLabel != null && complicationShortLabel.equals("TESLA")) { $.doTeslaComplication(complicationValue); }
Debug code shows that the complications are being sent (ie, doesn't assert) but they're not received by the watch face. The watch face is receiving the built-in Complications, just not my custom one. It was working before I compiled with CIQ 7.x. I think it was 4.2.4 (yeah, old, I know).