Stupid complications questions

Hello,

Before I head down the path of complications, please verify:

1) It's not that drastic to convert/publish my Glance as an app 

2) I can open my own app using a long press on an area of my compatible watch face

It looks a bit daunting from my amateur programmer seat.

Thanks

  • The way I do it is in my widgets/super apps, I have a background service that publishes it's complications every few minutes.

    A watch face can then subscribe to the complication and it will update each time the widget/super app publishes.

    I don't open the publisher the majority of the time. It can be done with an onPress on touch devices

  • Hi Jim, I have a widget (with a glance view) that I wanted to use to publish data through a complication. I undestood that I need to publish data through a background process (so that needs to be added to my widget). Do I also need to "convert" the widget to a watch app? I am not sure I understand the difference between activity apps and widgets anymore... 

    TIA /Fredrik 

  • On devices with complications or CIQ 4 devices in general, if your app type is "widget", it gets built as a super app for devices like the 955/965/venu3/va5

    Here's what I see in the console when I build a "widget" that publishes for the fr965

    WARNING: fr965: No supported languages are defined. It's a good idea to indicate which languages you are supporting.
    WARNING: fr965: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'fr965' (65x65). Image will be scaled to the target size.
    BUILD SUCCESSFUL
    * Terminal will be reused by tasks, press any key to close it.

    And the same if I build for a fr945

    WARNING: fr945: The 'ComplicationPublisher' permission is invalid for app type 'widget'.
    WARNING: fr945: No supported languages are defined. It's a good idea to indicate which languages you are supporting.
    WARNING: fr945: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'fr945' (40x40). Image will be scaled to the target size.
    BUILD SUCCESSFUL
    * Terminal will be reused by tasks, press any key to close it.

  • Thank you Jim. I take that as I should not have to convert the widget to an activity app. I just need to add a bg process to publish the complication data 

  • My apps that publish are still "widgets" in the app store.  Here's one that supports most devices back to the original vivoactive for example. Notice under permissions, it has

    • Broadcast data for watch faces to subscribe to.

    https://apps.garmin.com/en-US/apps/6a740b9d-7bba-4ed8-bedd-2cabaef4bdcf

  • BLUF: I need a bare bones example of a functioning complications watch face.

    I initially tried to modify a functioning watch face.  That went bad, quick.  Then I tried to make a bare bones watch face that displays the time and steps.  Then, when the screen is touched, the Garmin steps app would launch.  

    First, everywhere Garmin used "self:" it crashed.  So, I changed those out to variables.  Now, I cannot get this line in TempApp.mc, onStart() to work:

    Complications.subscribeToUpdates(mComplication);
    I get a "Symbol Not Found Error".  mComplication is defined globally as:
    var mComplication = Complications.getComplication(new Complications.Id(Complications.COMPLICATION_TYPE_STEPS));
    The entire app (in it's rough, non error checking just get it to work on a Venu 2) is located at:
    Please, Monkey C masters, throw me a bone!
    Thanks,
    Jeff
  • See this thread where I posted one that uses a complication for heart rate on devices that support them. It build with the default type checking.

    https://forums.garmin.com/developer/connect-iq/f/discussion/349473/simple-example-wf-that-shows-a-bunch-of-things

  • Stage 2...

    I was able to get complications info to work (Thanks jim_m_58!), now the next biggy.  

    The press and hold does not work in the simulator.  Does the simulator work for this, or do I need to stick it on a watch?  Also, jim_m_58 has it under a delegate (it does not work on his, neither).  Does it have to be under a delegate (I didn't read that anywhere), or can I just have it in-line?

    Thanks again!

  • You use "onPreess" in a delegate. Where the delegate is passed in the return for getInitialView. In the sim, when you move the mouse to the heart rate, and press and hold, you get this for the venu2:

    On the real device, you see the heart rate glance.