Is it possible to upload a third-parties widget to GARMIN 1040 without using Garmin Connect?
In which directory should it be uploaded and what extension should it have (.prg?!)?
Is it possible to upload a third-parties widget to GARMIN 1040 without using Garmin Connect?
In which directory should it be uploaded and what extension should it have (.prg?!)?
... I checked! I actually see it as an APP!!! How do I "transform" it into a widget?
On my old 1030 it was seen as a widget ...
If the manifest says "widget" all you have to do is add a glance view. It will then show up in both places.
In your AppBase, you need something like
(:glance) function getGlanceView() { return [ new WUWGView() ]; }
With what you want to see in the view returned
See https://developer.garmin.com/connect-iq/core-topics/glances/
Ok thanks! ...I'll study it now!
(:glance)
function getGlanceView() {
return [ new WUWGView() ];
}
... I'm trying to understand the "glance" argument ... but it's not clear to me ... what is WUWGView() ?
The (:glance) annotation is so it's available for glances, and WUWGView is the view class I wrote to display the glance
Here's a screen shot of what I see when I start that app in the sim for the 1040. What you see is done by my glance view.
if I tap on the glance the widget opens in full screen mode.
Here's another one of my apps you can try on your 1040 to see how it looks.
https://apps.garmin.com/apps/6a740b9d-7bba-4ed8-bedd-2cabaef4bdcf?tid=0
You need to get your own (free) APIKEY from the OWM site.
...thanks a lot...I'll do some tests...
Here's an ultra simple glance view I use in another widget. All it does is display the app name.
using Toybox.Graphics as Gfx; using Toybox.WatchUi as Ui; (:glance) class PiGdGView extends Ui.GlanceView { var appname=""; function initialize() { GlanceView.initialize(); appname=Ui.loadResource(Rez.Strings.AppName); } function onUpdate(dc) { dc.setColor(Gfx.COLOR_WHITE,Gfx.COLOR_TRANSPARENT); dc.drawText(0, dc.getHeight()/2, Gfx.FONT_GLANCE,appname, Gfx.TEXT_JUSTIFY_LEFT|Gfx.TEXT_JUSTIFY_VCENTER); } }