Connect IQ 2.1.2 SDK Available!

The v2.1.2 release of the Connect IQ SDK is now available!

You can get it one of two ways:

  • Use the Connect IQ SDK Manager in Eclipse, by clicking the Connect IQ menu, selecting Open SDK Manager, and then clicking the Download button for Connect IQ SDK v2.1.2 released August 9, 2016.
  • Download directly from our developer site at http://developer.garmin.com/connect-iq/sdk/


There are all sorts of new features available in this release of the SDK, many of which are highlighted here: http://developer.garmin.com/index.php/blog/post/connect-iq-2-the-biker-has-arrived. View the README included with the SDK for a full set of release notes!
  • It is posible donwload app versions?

    Hi,

    I updated my DataField App for metric recording to the fit file but this versión only work in EDGE (Minimun SDK versión 2.1.x)

    As I get the previous version is visible to other devices compatibles? or i have create other App with old versión (Minimun SDK versión 1.2.x)?

    Thanks
  • Known Bugs

    Here's a list of some bugs that I've run across when using the 2.1/1.3 CIQ SDK with the latest released (as of Aug 15, 2016) firmware on each device.

    [table="width: 500, class: grid, align: center"]
    [tr]
    [td][/td]
    [td][/td]
    [td]Devices[/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [/tr]
    [tr]
    [td]Bug[/td]
    [td]App/DataField[/td]
    [td]Edge 520[/td]
    [td]Edge 1000[/td]
    [td]Fenix 3[/td]
    [td]920XT[/td]
    [td]235[/td]
    [td]vivoactive[/td]
    [td]test case[/td]
    [/tr]
    [tr]
    [td]No Start/Lap Button Response[/td]
    [td]App[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]buttontest App[/td]
    [/tr]
    [tr]
    [td]Object Store doesn't save[/td]
    [td]App[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]Object Store Sample App[/td]
    [/tr]
    [tr]
    [td]Fit File Time Stamp and Position Corruption[/td]
    [td]App/DataField[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]Moxy Edge Data Field[/td]
    [/tr]
    [tr]
    [td]Generic ANT Instability[/td]
    [td]App[/td]
    [td]No[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]M515Cycle App[/td]
    [/tr]
    [tr]
    [td]App won't pair to Native Sensors[/td]
    [td]App[/td]
    [td]No[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]Maybe[/td]
    [td]No[/td]
    [td]No[/td]
    [td]sensortest App[/td]
    [/tr]
    [/table]

    The No Start or Lap button response is that Edge apps don't return on onKey event at all for start and lap buttons.

    The Object store simply doesn't save values on the Edge 520 apps.

    The Fit File Time stamp problem is that fit files on the devices listed as having the bug have incorrect time stamp values (off by like 20 years) when developer data is added to the fit file. The problem seems to be in the device firmware, not Garmin Connect. There is another thread on this issue.

    The Generic ANT instability is that the App crashes some percentage of the time when the app is started. It produces the following CIQ_LOG and console log file entries. I have not found a way to reproduce this reliably. The problem is worse when more native sensors are connected and can be affected by small changes in the code. All 4 of my Moxy apps have it, but I haven't been able to produce it with a stripped down app.

    CIQ_LOG
    ERROR: Unhandled Exception
    DETAILS: Failed invoking <symbol>
    STORE_ID: 00000000000000000000000000000000
    CALLSTACK:

    WARNING: Unfreed memory on exit
    STORE_ID: 00000000000000000000000000000000


    Console Log file
    Unable to acquire ANT Channel
    initialize in C:\Hudson\workspace\Fitness-Manual-Kona-Release\TVM\api\Ant.mb:443
    initialize in C:\Users\Rog\Documents\Eclipse6\workspace_2_1_0\M515Cyc_1_0\source\WelcomeView.mc:9
    openSensor in C:\Users\Rog\Documents\Eclipse6\workspace_2_1_0\M515Cyc_1_0\source\MO2Sensor.mc:76
    initialize in C:\Users\Rog\Documents\Eclipse6\workspace_2_1_0\M515Cyc_1_0\source\MO2Sensor.mc:56
    onStart in C:\Users\Rog\Documents\Eclipse6\workspace_2_1_0\M515Cyc_1_0\source\M515Cyc.mc:296


    The App not pairing to native sensors occurs seemingly randomly on some devices. The sensortest app fails to connect 70% of the time on an Edge1000 and fails 30% of the time on a Fenix 3. I don't remember if I've seen it on a 920XT.

    Garmin is aware of all of these and has the test cases, but I just wanted to share them here to save some time for other programmers.
  • Hi Jim,

    I am talking about an official data field: https://apps.garmin.com/de-DE/apps/46016194-1fdf-4f9b-ae8b-16ceba51a548

    And a further problem came up (sorry for posting so much problems): I released a new version yesterday which worked well in the simulator, but after downloading the released version from Garmin site (and reinstalling it on my watch) I only get the IQ icon instead of the datafield. Is this also a known problem, maybe with the new authentication mechanism?


    I'm having this same problem. App runs fine in all emulators, but when downloaded from the store I just get an IQ icon. My friend reported the same thing on his Fenix.

    UPDATE: I deleted the app from my 520 and reinstalled and it works fine now. I asked my friend with a Fenix to do the same and the app works for him too, so it's just the first install of the my datafield app that doesn't display correctly. I checked my code against the docs/programming guide and I'm sure this is a bug. I've been using the app on my 520 for a few weeks and only saw this error when compiling against 2.1.2.

    UPDATE 2: The error comes back after I change the settings of the data field via Garmin Express or the Garmin Connect mobile app.
  • Not sure what happened to my last comment

    Not sure what happened to my last comment, but just to make sure I've reported this issue:

    If you have a DataField app (I'm using SimpleDataField), you can download and run the app on a device. When you change the settings via the Garmin Connect Mobile app, or via Garmin Express, the app then displays an error icon when you start the activity. You can reinstall the app and the error goes away, but if you change the settings it breaks the data field. I can run the app in various emulators and change the settings and run the app, and don't see the issue.

    Also, is there a bug tracking system the developers can log/track issues or do we just bring up issues on the forum?

    Rob
  • When you get the IQ!, look on the watch in \garmin\apps\logs\ciq_log.txt as that might point you to it.

    With GCM-Android there was/is an issue where it was setting a value as a float when you expect a number, and there are a bunch of threads that show a work-around. Here's what I do when reading a number:
    function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value==null || !(value instanceof Number)) {
    if(value!=null) {
    value=value.toNumber();
    } else {
    value=thisDefault;
    }
    }
    return value;
    }

    I check the value for null and make sure it's a number. If it's null, I return a default. Otherwise, convert what I did get into a number.
  • Hi Jim,
    Is this also a known problem, maybe with the new authentication mechanism?


    If you have signing problems, it won't even run and will get deleted, and where you'd see that message is in \garmin\apps\logs\ciq_log.txt on the watch.

    That is also the first place to look when you get an IQ! though. Are you checking for null when accessing things in Activity.info, etc?

    See this thread for basic debugging info:

    https://forums.garmin.com/showthread.php?339891-New-Developer-FAQ
  • When you get the IQ!, look on the watch in \garmin\apps\logs\ciq_log.txt as that might point you to it.

    With GCM-Android there was/is an issue where it was setting a value as a float when you expect a number, and there are a bunch of threads that show a work-around. Here's what I do when reading a number:
    function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value==null || !(value instanceof Number)) {
    if(value!=null) {
    value=value.toNumber();
    } else {
    value=thisDefault;
    }
    }
    return value;
    }

    I check the value for null and make sure it's a number. If it's null, I return a default. Otherwise, convert what I did get into a number.



    Thanks for the info. I ended up putting some debug statements in the app and had it write to the debug file and found out that the settings were coming back as strings from App.getApp().getProperty(). I've changed the settings in the Eclipse settings editor and written some tests, but for some reason this issue doesn't happen in the emulator. Anyway, it's fixed and published now. Thanks for the help.
  • It´s not possible anymore to store the sdk file on location where a filepath with a space in it is used.
    There maybe a problem reading this kind of paths.

    At the older 1.x version this was no problem

    An other problem, I always have to activate the sdk in the iq sdk manager after starten ecplise the first time.

    Anyone have the same issues?
  • Here's a list of some bugs that I've run across when using the 2.1/1.3 CIQ SDK with the latest released (as of Aug 15, 2016) firmware on each device.

    [table="width: 500, class: grid, align: center"]
    [tr]
    [td][/td]
    [td][/td]
    [td]Devices[/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [td][/td]
    [/tr]
    [tr]
    [td]Bug[/td]
    [td]App/DataField[/td]
    [td]Edge 520[/td]
    [td]Edge 1000[/td]
    [td]Fenix 3[/td]
    [td]920XT[/td]
    [td]235[/td]
    [td]vivoactive[/td]
    [td]test case[/td]
    [/tr]
    [tr]
    [td]No Start/Lap Button Response[/td]
    [td]App[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]buttontest App[/td]
    [/tr]
    [tr]
    [td]Object Store doesn't save[/td]
    [td]App[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]No[/td]
    [td]Object Store Sample App[/td]
    [/tr]
    [tr]
    [td]Fit File Time Stamp and Position Corruption[/td]
    [td]App/DataField[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]Moxy Edge Data Field[/td]
    [/tr]
    [tr]
    [td]Generic ANT Instability[/td]
    [td]App[/td]
    [td]No[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]No[/td]
    [td]No[/td]
    [td]M515Cycle App[/td]
    [/tr]
    [tr]
    [td]App won't pair to Native Sensors[/td]
    [td]App[/td]
    [td]No[/td]
    [td]Yes[/td]
    [td]Yes[/td]
    [td]Maybe[/td]
    [td]No[/td]
    [td]No[/td]
    [td]sensortest App[/td]
    [/tr]
    [/table]



    Here's an update as of Sept 17, 2016 on this list of bugs in case anyone is interested or stumbles on this post later.

    The Edge 520 and 1000 not responding to the start and lap button was fixed 1 or 2 FW releases ago.

    The object store not working on the Edge 520 was fixed 1 or 2 FW releases ago.

    As far as I know, all of the FIT file corruption bugs have been fixed on the current released firmware.

    The last 2 rows of the table are more complicated. I've been working directly with Garmin on them for a long time now. I could robustly create a crash on my devices and send them a test case and it would work fine on their devices. The problems would come and go for me too. After many YouTubes showing CIQ crashes on all manners of sample apps, Moxy Apps, and test cases, I finally figured out that the root of the problem lies in having "too many" sensors on the native sensor list on the device. This scenario causes both problems described in the last 2 rows of the table and several others. It's not clear exactly how many "too many" is.

    This problem will affect Any APP that uses native sensors including the Sensor Sample App in the 2.1.2 SDK. I've spent the most time with it on an Edge 1000, but I've also observed it on a Fenix 3 and 920XT. It's not directly related to the Generic ANT channel, but that can get messed up too. Data Fields are OK by themselves but if you run an APP and then a data field, it can cause problems in the Data Field.

    Generally, the native part of the device only connects to 1 HR sensor at a time. However, you can have a lot of HR sensors listed on the sensor list on the device. The following procedure works on an Edge 1000, but I think it will show the problem on other devices too.
    • Remove all the sensors from the sensor list on the device
    • Add in just 1 HR sensor
    • Load the Sensor Sample App on the device. This just shows HR
    • It should run fine at this point. It just shows HR on the screen.
    • Go back into the Settings and manually add in more HR sensors (on the Edge, you can just type in a sensor number so you don't have to actually have 10 HR sensors)
    • Now rerun the Sensor Sample App, it won't connect to the first HR Sensor any more. Just having the extra sensors on the list causes this problem.
    • Go back and remove the 9 HR sensors and the sample app will work again


    Having the extra sensors in the list doesn't affect Data Fields or native activities, just CIQ Apps.

    This isn't an all or nothing type of bug. 0 extra HR sensors works all the time. 9 extra HR sensors fails all the time. 2 or 3 extra makes it fail sometimes. Having "too many" extra cadence sensors can also cause the HR to fail

    The failure modes that I observe from this are 1) the failure to connect to native sensors in an APP and 2) if you use sensors in an App and exit the app, then go to a Data Field with a Generic ANT channel, creating the new ANT channel will throw an error on the first try 3) crashing the whole device when creating a Generic ANT channel in and App after sensors have been used.

    Garmin is working on fixing the issue. For now, if you have the problem, just remove extra sensors from the native sensor list until it goes away.
  • Garmin is working on fixing the issue. For now, if you have the problem, just remove extra sensors from the native sensor list until it goes away.


    As I am currently beta testing an IQ app to pair with Ant FE-C sensors, I found difficult to pair my F3 (almost failed each time) whether it pairs quite ok with my VAHR and very fine with my EDGE 520 (ok EDGE is ready for FE-C).
    Then I mesure the "ANT Sensors Pairing time out" of each devices (with Parameters/Sensors/add new/Search All) until the Retry/Cancel window appears.
    I found the following :
    F3 (FW 7.62) : <5-10 sec
    VAHR (FW 2.90): > 20-25 sec
    EDGE 520 (FW 7.20): no limit I have to press the button Back to cancel!

    As My VAHR and F3 have the same numbers (8-9) of extra sensors (HR, speed/cadence, footpod, Cadence, ...) then I suggest a combination of "Number of extra sensors" and "ANT Sensors Pairing time out" issues.