Old vs Beta Firmware

Is there any way to get the firmware version and write the code according to it?

Just received a rating that the Watchface is not working on older firmware. I'd like to write what the code should print or what it shouldn't in case of older firmwares (and seconds will not be displayed).

Any suggestions?
  • There isn't any way to get information about the firmware version of the device from within ConnectIQ.

    I think the best thing you can do at this time is to add notes to your app description about what firmware you expect on which devices, and then update that list as you are told about these types of issues. For instance, on the 920XT, the low power mode feature didn't become available until the 3.03 firmware, so you can say that the feature won't work unless they have that version or later.

    It would be nice if the app store could look at your upload and determine which features your application used, and then display this information automatically. Or better yet, prevent users that have older firmware than required from downloading your app at all.

    Travis
  • Of course you can check feature avaiability via HAS operator.
    For example, how to test if firmware can detect BT connected:

    if (Toybox.System.getDeviceSettings() has :phoneConnected)
    {//do something}

    Don't forget to compile with latest SDK.
  • Yes, that is available and could be used to prevent your application from crashing. I'm guessing that is the case with CubeWatch 2.0.
  • In applications you can use HAS operator for feature check and let users know when feature is not present. But you are right, what is really missing is functional exception handling.
  • Many thanks gets for the help.

    I will try to implement the changes and upload a new version.

    Many thanks!!!

    Best regards
  • I could actually see something like an "About" class under System with things like the FW version, the device it's running on, and even the serial number of the device (maybe a "0" id when running on the simulator?).

    Maybe even a way to get the version of the connect IQ SDK it was built on.

    While "has" can be used, it seems that the details would add some flexibility. You could vary behavior based on the device/firmware, and not have an "all or nothing".
  • Gents,

    I don't know exactly why, but using "Has : phoneConnected" , memory starts to build up until simulator crashes.

    Starting to the woried about the bad ratings! :(
  • Yes, it seems there is a bug in older firmware < 3.03 which causes out of memory if you check for the feature with HAS operator. It's OK in 3xx betas. I had this problem in my watch face too and obtained several low ratings. Workaround is moving feature check with HAS operator into constructor or onLayout method, which is not called on every update.
  • Yes, it seems there is a bug in older firmware < 3.03 which causes out of memory if you check for the feature with HAS operator. It's OK in 3xx betas. I had this problem in my watch face too and obtained several low ratings. Workaround is moving feature check with HAS operator into constructor or onLayout method, which is not called on every update.


    Many thanks! It worked (at least in the sim)!