Querying firmware versions?

I'm wondering if there's a way to query for the device's firmware version?

I'm not seeing anything in the SDK docs so far, but it's possible I've missed it.

The use-case here is, I know that my app doesn't work with certain versions of older firmware, and I'd like to present a helpful 'Please upgrade screen', rather than the current behavior which is typically some form of crash. (I haven't been able to replicate this locally, so these accounts are second-hand, but evidence is building that it really is just older firmware...)
  • No way to do it directly, and it's been requested in the past. They are saying that there will probably be something in the app store to do this at some point in time (don't let the app be installed if the FW is too old)

    If it's the matter of a missing function on older versions, using "has" might work in those cases.
  • For most issues of this type you don't need to know the firmware version, you just need to know the feature that your app is trying to use that is not available. For instance...

    function getInitialView() {
    if (Toybox has :Attention) {
    return [ new AppView(), new AppDelegate() ];
    }
    else {
    return [ new UnsupportedView(), new UnsupportedDelegate() ];
    }
    }
  • For most issues of this type you don't need to know the firmware version, you just need to know the feature that your app is trying to use that is not available. For instance...

    function getInitialView() {
    if (Toybox has :Attention) {
    return [ new AppView(), new AppDelegate() ];
    }
    else {
    return [ new UnsupportedView(), new UnsupportedDelegate() ];
    }
    }


    That's the rub though, I have no idea what specific feature is missing because I don't have that version of the firmware to test it on.

    I'm just seeing anecdotally that it doesn't work on 2.40, for example, but it definitely works for 2.90. So I'd like to add a guard very early in code execution that protects against suspected bad versions before I can hit undefined functions.

    In cases where I know upfront what's missing though, totally agree that adding dynamic checks like that are useful.
  • If it's a vivoactive, prior to 2.60, checking "phoneConnected" caused a crash. And as you are doing comm, I can see where you might be checking that.

    in initialize(), I have this:
    availableStatBT=(Sys.getDeviceSettings() has :phoneConnected ) ? true : false;

    and then use availableStatBT where needed. ("has" is more expensive that just checking a boolean, so I only do "has" once.)
  • If it's a vivoactive, prior to 2.60, checking "phoneConnected" caused a crash. And as you are doing comm, I can see where you might be checking that.

    in initialize(), I have this:
    availableStatBT=(Sys.getDeviceSettings() has :phoneConnected ) ? true : false;

    and then use availableStatBT where needed. ("has" is more expensive that just checking a boolean, so I only do "has" once.)


    You know, that's probably it, thanks so much for the tip here!
  • That is in fact the only thing I've seen that will works on newer va FW but will crash older versions.
  • As a note, I've added a check to at least one of my apps to display a screen indicating their device firmware wasn't up to snuff. Literally the first review I got after adding this functionality was complaining that the app displays the string firmware update required and does nothing. It seems that you just can't win.
  • As a note, I've added a check to at least one of my apps to display a screen indicating their device firmware wasn't up to snuff. Literally the first review I got after adding this functionality was complaining that the app displays the string firmware update required and does nothing. It seems that you just can't win.


    Heh, yeah I get complaints about my 'Connection Unavailable' screen as well; even if the Garmin native widgets are displaying the same thing. C'est la vie....
  • You know I wish the SDK documentation would include which versions of the firmware support a particular call. Something like:

    phoneConnected (VA 2.60+)

    Python's standard library documentation is very good about this kind of thing, so I'm a little spoiled in that regard...
  • That is in fact the only thing I've seen that will works on newer va FW but will crash older versions.


    Ui.Confirmation, Ui.NumberPicker, Ui.ProgressBar, Ui.TextPicker, Ui.WatchFace, Toybox.Attention, View.findDrawableById(), Gfx.FONT_NUMBER_MILD, Gfx.FONT_NUMBER_MEDIUM, Gfx.FONT_NUMBER_HOT, Gfx.FONT_NUMBER_THAI_HOT, and Gfx.TEXT_JUSTIFY_VCENTER are a few that come immediately to mind. These became available in early versions of the SDK (after the fr920xt, but before the vivoactive) so the chance of them biting you is minimal.