Widgets for Fenix 6

Thanks Garmin for the SDK update, 3.1.3 allows to get watchface and data fields easily for the new watches, but doing the same job for widgets means some work...

Recompiling an "old" (fr935/fenix5) widget for the fenix6 shows only a small icon and the name of the widget which can be scrolled up and down using the keys but that's it. Does anyone have a small example source code for the new widget type?

  • Hi Jim,

    i saw in your exemple that you created 2 classes,

    one with extends WatchUi.GlanceView

    and one with extends WatchUi.View

    I have only one with .GlanceView

    is it a big deal? should I remake my Galnce like you did?

  • Never mind... 

    Ive just noticed even if you put glance it is the initial view of the widget... 

  • Use a separate class. and annotate the glance view.  You know what view you're in, and can educe the memory of the glance view by easily excluding things you don't need.

    In a couple of cases, I have the glance view down to about 17kb (including the background process), while the full screen is 30kb (too large to run in a glance)

  • Perhaps I'm misunderstanding, but is the way to test widgets on glance-supported devices by switching 'Glance View' on and off in the simulator? I have a compass widget I want to port, and while I can go up and down in the glance view I seem to have no way to 'select' the widget using the watch itself...

    When disabling 'Glance View' in the simulator I DO see the widget in it's normal behavior... Looking at the supplied code I don't quickly see any specifics to handle the swtich from glance to normal widget view?

  • On a devices, when you are in glance view, when a widget is in the middle position, pressing start takes you to the full screen view.

  • Thanks, in that case I AM doing something wrong because pressing start does nothing... back to the drawing board.

    Given the limited time I have for this stuff this could be a reason to stop supporting new devices though, too often changes needed in code, font sizes, layouts...

  • The start button thing is not available in the sim.  Just on the real devices.  In the sim, turning on/off Glance View is the way to do testing. I don't really mind it, as when I've been adding glance support, I'm generally just looking at the glance and making minimal changes to the full screen view.

    One thing about the f6 and widgets, is it's not mandatory that a widget supports a glance view.  If it doesn't the user will just see the widget's icon and app name.  That you can see in the sim if you have glance view selected with a widget that doesn't have a glance view.  When I first ported widgets to the f6 devices, none of them had glance views, and I've been gradually adding that.

  • Ah ok, sorry! In that case it does seem to work... thought you meant the start button in the sim. *phew*

  • Actually, I just realized that a last minute fix that we made disabled the ability to use resource scopes. This won't work (in the simulator or on devices) until we release an update. Sorry for the false hopes guys. The code is there, it is just disabled.

    Did this ever get fixed, ? And if so, on what CIQ version? I think I'm hitting this with a user helping me who has a Fenix 6 Pro.

  • I do think it's been fixed in the sim, but on a real device, make sure the user is running the latest FW.