Glances and Widgets: User Input?

A user asked for a Watch Widget that takes user input to record particular events throughout the day.

I'm confused since I've never written anything other than data fields, mostly for EDGE devices.

https://developer.garmin.com/connect-iq/core-topics/glances/#glances

1. I understand we can't use the Watch touchscreen to allow users to interact with our CIQ apps, right? We can on EDGE devices.

2. I also read here that we can't even use the buttons, since they are dedicated to device functions. Is that true? FlowState described a sketchy hack that really isn't viable.

So, is there a reasonable way to allow a user to interact with a Widget to submit a selection. Say for example the widget offers 4 choices for the severity of an event. They somehow pick from the 4 and hit select. It records the timestamp and selection. Very basic request. I'm just not sure if we can do that in a CIQ Widget.

The next question is: what can we do with the accumulation of inputs? I'm thinking one or both of these:

  • The widget could show the results. Allowing the user to scroll to an input view -vs- a summary view for the day.
  • Write to a FIT file maybe but I'm not sure widgets have a way to SAVE a FIT file to Garmin Connect?

Top Replies

All Replies

  • This is extremely helpful. Wow. And complex. It'll take a bit to map out the flow and states to flesh out in the design. Thank you!  Flow State!

  • Sure np. I updated my 1st code snippet (the complex one) to add a missed case (where onStart's state is null or it doesn't support launchedFromGlance.)

    It's far less complex if:

    - you don't care to distinguish between the app being launched from glance, complication or app list

    and/or

    - you don't need to support devices older than CIQ 4+ (so you don't have to support the fullscreen widget case)

  • What would be really helpful, would be a Hello World example, that handles the various conditions related to Glance Previews, Widget Carousel, launching the application in the various launch modes, etc. I'm not sure I'm even describing the use cases properly, but you get the idea. Best Practices in dealing with those cases. I haven't even looked into the samples in SDK 8 beta yet, but I'm guessing that doesn't exist.

  • Yeah, I don't think so. I don't think Garmin wants to dive into all the complexities of old widgets vs new device apps with glances (super apps). I think that's why they removed all mentions of "super apps" from their docs, last time I checked.

    It's really a lot simpler if you only focus on CIQ 4/5 devices for this stuff.

    Also, I thought of one good reason that a widget / device app with glance might want to distinguish whether it was launched via glance, activity app list or complication (as opposed to just checking for full-screen widget vs not full-screen widget).

    If a device app is launched via glance, then it's not allowed to record an activity (afaik), so if you have that option in your UI, it should be removed or disabled for the glance case. If it's launched from the activity/app list, recording should be fine.

    (Tbh I'm not sure if an app launched via complication can record an activity - I guess it depends whether the "launched from complication case" acts the same as being launched from a glance, or as being launched from the activity/app list.)