Why Widgets can't publishing Complications?

I have a widget that I was hopping to use to publish complications, but SDK does not allow me to add publish complications permission. For some reason, it must be an app, not a widget.

Yes, I know they are "super apps" since 4.0, but if I change my widget to be an app, will it stop being a widget on older devices without Glances and devices with API below 4.0?

  • Make sure you are using the 4.2.1 SDK.

    The permission required generates a warning (it was an error in beta2)

    WARNING: fr945: The 'ComplicationPublisher' permission is invalid for app type 'widget'.

    but it still builds and runs.

    What I do right now is use jungles to only include the xml for publishing in devices with complications - otherwise that will throw an hard error.  There however is a bug, where for devices like the fenix7, the ww version has complications, while the APAC version doesn't, so you can't build an iq file - only side loads.

    if I include the xml for a device without complications, like the 945. I get this:

    ERROR: fr945: C:\Users\James\workspace-prod\WuWidComp\resources-comp\comps\comps.xml: Complications are not supported by device 'fr945'.  

    The venu2sq devices currently have a bug, but other than that, I can run my "widget" in the sim, starting with the original ciq 1 devices, and can "view complications" (Simulation>Complications), use "Build for device", and create sideloads.  But can't build an iq file.

    Garmin knows of the issues I mentioned and are working on fixes.

    Using a CIQ app that publishes in something like a watch face is a bit tricky, Starting with the type is "Complications.COMPLICATION_TYPE_INVALID" and if found, you have to look for the actual one you want.

    This all said, I have a widget that publishes on devices with complications, a watch face that uses what's published, including onPress to launch the publisher.  I've had that working with the 4.2.0 beta SDKs.  The onPress thing does have issues on some devices, even for native complications.  On the 955, neither work even in the sim or real device for example, though I can display what I publish with a WF in the sim.

  • Also see https://forums.garmin.com/developer/connect-iq/f/discussion/326713/glance-folders-and-complications

    for info about publishing and glance folders.  Glance folders are something that's only available on newer devices like the f7,fr955, 255, etc.

  • So 4.2.1 is rather beta maybe even alfa in case of complication - more than less  doesn't work than works, tricks to do something.

    No wonder devs have problems at every turn and spend hours getting anything running.

  • Actually, 4.2.1 is in better shape than beta1 or beta 2.  There are still some pretty rough edges, but today, much better shape than last Oct.  That's why beta SDKs are out there.  

    The doc is still rough too.  It was written by someone that understood how it should work, and maybe doesn't have the details needed for someone just starting.

    That said, I've been using a publisher and a WF that understands that publisher for a few months now on my wrist.

    One example is that with a publisher, you probably want to have a background service that publishes when needed.  In my case, the publisher does a makeWebRequest every 15 minutes, and if that succeeds, I publish.  If the "widget" is opened and there's new data or I change the location for the weather, , I also publish.

    In the sim, the publisher can run in the background, while my test WF that uses it is running in the sim, and I can see when I publish.

  • You have mentioned about trouble with APAC. So how to limit app to some device?

    As I understand, there are 2 ver. of watches APAC and WW and division is by part number, but jungle operates on name so ho to limit something to WW?

    btw

    I can't see in watch region but language. So how this limits runs? 

  • There is definitely a learning curve with complications, especially publishing.  But there also was with 1hz, BLE, backgrounding, etc. Here's a thread from a couple months back where testing on real devices first started.

    https://forums.garmin.com/developer/connect-iq/f/discussion/317937/made-some-progress-on-publishing-complications

  • It's about building the iq file.   What you're looking at is after the iq file has already been uploaded to the store. See https://forums.garmin.com/developer/connect-iq/f/discussion/326276/export-build-error-complications-are-not-supported-by-device-epix2/1583541#1583541

    What you're asking is something Garmin is working on a fix for.

  • Here's a screen show from the sim of my test WF on a 965.  There's a few things going on here which ,ay not be obvious.  The weather data below the date comes from my widget that publishes, and the data updates when the background of the publisher runs (yes, even in the sim!).  The steps info at the top comes from COMPLICATION_TYPE_STEPS, a native complication.

    Doing onPress above the time, opens the native glance for steps, and below the data opens my "widget" that publishes.  Since the 255 doesn't have touch, no "onPress" there, but this works fine on a real venu2.

  • The permission required generates a warning (it was an error in beta2)

    WARNING: fr945: The 'ComplicationPublisher' permission is invalid for app type 'widget'.

    but it still builds and runs.

    Do you edit manifest.xml manually to add 'ComplicationPublisher' permission to widget app? UI does not have this option.

    if I include the xml for a device without complications, like the 945. I get this:

    ERROR: fr945: C:\Users\James\workspace-prod\WuWidComp\resources-comp\comps\comps.xml: Complications are not supported by device 'fr945'.  

    Which XLM do you mean? This one - "<complications>" ?

    Garmin knows of the issues I mentioned and are working on fixes.

    What exactly are they going to fix? Allow widgets to publish complications or just XML error?

  • Do you edit manifest.xml manually to add 'ComplicationPublisher' permission to widget app? UI does not have this option.

    Yes. and the name changed between beta2 and 4.2.1

    Which XLM do you mean? This one - "<complications>" ?

    Yes

    What exactly are they going to fix? Allow widgets to publish complications or just XML error?

    The ability to build iq files for things like the f7 ww/apac devices and the device files for the venu2sq devices.  Exactly what they do with the iq file problem, I'm not sure.