Converting a widget to publish complications starting questions

Hello again.  Now that I have a working grasp on consuming complications (I'm device testing my update now), I would like to try and publish my glance as a complication.  

So...My newb questions.

1) I know the Manifest modifier is currently broke and reported as such.  When it is fixed, I just need to select the "Complication Publisher" box.  Nothing more with that?

2) in my App, getApp() function, I use "return Application.getApp() as ZuluGlanceApp;"  Does this need to change?  I'm thinking about the Delegate(view) needed in the subscription version.

3) I have to add complications to my resources.  I believe a new file "complications/complications.xml" under the resources folder will suffice, or do I add the complications publishing "stuff" to an existing file?

4) My glance calculates 4 different pieces of zulu time information. Can I only publish one of those pieces, or is each piece considered a complication that can be published from one app?  Garmin website's Core Topics is a bit muddy on this (the glancePreview explanation is throwing me)

5) There was some discussion about running a background process in the glance to keep the info current and available to the calling WF.  Mine does calculations based on information provided by Toybox.Time.Gregorian only (no outside connection used).  My understanding is that I still need to add some kind of background process to the glance.  For example, I could move the Julian day calculated, which updates every day, to a background process.  Is this correct?  

Thanks

  • 4) My glance calculates 4 different pieces of zulu time information. Can I only publish one of those pieces, or is each piece considered a complication that can be published from one app?  Garmin website's Core Topics is a bit muddy on this (the glancePreview explanation is throwing me)

    Your app can publish multiple complications (theoretically, up to 256, as the id ranges from 0 to 255), but only one complication can be set as a glancePreview, which means that it's used to preview your glance when it's placed in a folder.

    developer.garmin.com/.../

    When users place your glance into a glance folder, you can identify one of your complications to be used as the preview value. Only one of your complications can be demarked as a preview.

    jim_m_58 made a post demonstrating this:

    forums.garmin.com/.../glance-folders-and-complications

  • Actually, an app can only publish 4 complications.  The id can be 0 to 255, but only 4 can be defined

    See https://developer.garmin.com/connect-iq/core-topics/complications/

    "In addition, device app and audio content provider developers can now publish up to four complications using this new framework. Complications have public, protected, and private visibility levels with the system."

    If you try to define more than 4, you get an error at compile time

    "ERROR: fr965: Exceeds maximum of 4 complications (5 defined)."

  • Here's a very simple publisher.  Still a bit of a work in progress I use for some testing.

    CompPub.zip

    It publishes 3 complications, one public, one private, one protected.

    It's got a background service that runs every 5 minutes.

    It handles devices that can publish and those that can't.

    Understand that for things published by CIQ apps, finding them in something like a watch face is different.  You want  to check for 

    Complications.COMPLICATION_TYPE_INVALID
    and then compare the longLabel to what you are looking for:

    if(complicationId.longLabel.equals(compName)) {...}
    Face It (the new one) will find what you published though.  (unless the type is "private")
  • Actually, an app can only publish 4 complications.  The id can be 0 to 255, but only 4 can be defined

    Thanks, my mistake!