Class for scrollable graph widget/glance views. (like HR, Stress, Body batt and many others)

Hi,

I'm finally getting around to getting my feet wet in the the GIQ toolchain, so this might be a totally newbie/dumb question. But I have looked through the docs and searched, with no result. And searching for "heart rate widget" or similar gives tons of stuff. So like finding a needle in a haystack. 

I working on making a widget (and glance) similar to the Garmin built-in Heart rate, stress, body battery, steps etc.

I had expected to find a class with a View type that one could just add data to and customize bit. Like the progressbar. Or at least find Garmin's code for one of them as a sample. But neither seems to be that case...

Might not be a big deal to draw everything from scratch, but I have VENU 2, coming from Venu (1) and Vivo Active 3, so I'm used to be able to swipe left to right, to see data for more than what fits on one page. And that, I can't figure out how to do with the current stuff in the toybox.

Also, I'd like to make a page/view with simple text that's bigger than one screen. Is there a way to scroll smoothly up/down or can that only be switching from page to page?

Thanks

Jesper, CPH Denmark

  • If you go to the command palette in VS Code and select "Monkey C:New Project" you can use the basic template to create an app of any type.

    "Money C: Open Samples Folder", you see a bunch of sample apps of all different types that demonstrate many different things.

  • toyboy

    before you start looking at monkey c with the wrong eyes, it's toybox ;)

  • Ah thanks. That's how you're supposed to get the samples.... At first I couldn't find them, so had to google and eventually found them in /Users/me/Library/Application Support/Garmin/ConnectIQ

    But you still have to use the "open folder" to load them, right?? None of the files seems to trigger VS code. The manifest.xml has VS code in the open list (Default to xcode for me) but just opens that file, so you still have to do open folder.

    A bit annoying they didn't make a project file or something (could be empty), so you can brower with finder and open that way....   Like xcode's .xcodeproject and VS .sln files

    Anyways. I went through them all before I posted. All except the ones that are clearly something else. (Like JsonDataResources and WebRequest)

    None of the samples has anything that looks or does like the Garmin ones. Or anything that lets you scroll a continuous multi page text. So a bit lost here... Garmin shows us it's possible, but don't tell how... :-(

  • You need to do that stuff yourself.  Look at using layouts or doing direct dc calls in your view.

    There are some native views you can use in your apps, but most things you'll be drawing yourself.

  • Thanks for your insight Jim.

    I have no issues drawing it myself. It's the scrolling part that the biggest challenge. As I see it, there is no way to replicate what the garmin widgets does. On the touch screen devices that is. And there will only be more and more of those, I suspect.

    My widget shows future grid electricity prices. Up to 36 hours ahead, But it turns out that's actually fine on one screen. Probably because it's in 1 hour resolution. So I guess I took the worry in advance.

    Now I just need to decide if they should be colored or not :-)