Connect IQ 1.2.8 SDK Available

The v1.2.8 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 v1.2.8 released May 13, 2016.
  • Download directly from our developer site at http://developer.garmin.com/connect-iq/sdk/

General Changes:
  • Add support for getting HR zones to the UserProfile module
  • Update device minimum firmware versions (should address trouble some vivoactive HR users were having installing certain apps)

Known Issues:
  • If an Exception is thrown from a catch block, the finally block of the current try/catch/finally will not be executed


There is also a 1.2.8 release of the Eclipse plug-in, which takes care of an App Settings Editor problem on Mac. Just go to the Help menu in Eclipse, and choose Check for Updates.
  • Error

    Upgraded to latest SDK but when I try and update Eclipse for the connectIQ update I get this

    An error occurred while collecting items to be installed
    session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    No repository found containing: osgi.bundle,com.ibm.icu,54.1.1.v201501272100
    No repository found containing: osgi.bundle,com.jcraft.jsch,0.1.53.v201508180515
    No repository found containing: osgi.bundle,javax.servlet,3.1.0.v201410161800

    etc.
  • Former Member
    Former Member
    Heart rate zones from UserProfile, most excellent :)
    Thank you, CIQ Team!

    -Torstein
  • Cannot connect to Connect IQ Device Simulator

    I installed the latest Java SDK 8u92, the latest Connect IQ 1.2.8 SDK, the latest Eclipse IDE for Java Dev (4.5.2), and the latest Connect IQ plug-in. I am on a Windows 7 PC.

    Now Eclipse cannot connect to the Connect IQ Device Simulator.

    Found Transport: tcp
    Connecting...
    Connecting to device...
    Timeout waiting for device info
    Transport Error 0
    Connection Finished
    Closing shell and port
    Found Transport: tcp
    Connecting...
    Connecting to device...
    Timeout waiting for device info
    Transport Error 0
    Connection Finished
    Closing shell and port
  • Should we still be using Mars, June 24, 2015 Eclipse for Mac?
  • Should we still be using Mars, June 24, 2015 Eclipse for Mac?


    I am using Mars.2
    Not sure what the release date was
  • Should we still be using Mars, June 24, 2015 Eclipse for Mac?


    I'm still on Luna - that I downloaded back when I started with CIQ in jan/feb 2015.
  • Now Eclipse cannot connect to the Connect IQ Device Simulator.


    Could it be a firewall issue? With each new SDK I have to approve the simulator in the firewall settings (It's using a connection to "localhost" to pass things between the sim and Eclipse I believe)
  • getHeartRateZones usage

    Add support for getting HR zones to the UserProfile module


    Thanks Garmin :D

    But I have some questions ragarding the new functionality...
    - The SDK 1.2.8 is necessary on each device? So we have to wait that each device gets a firmware upgrade with the support of this SDK?
    - To be compatible with current firmwares the apps have to check if this functionality is possible on the device. Is this check enough: "if Toybox.UserProfile has :getHeartRateZones" ?
    - Using the getCurrentSport-method will read the default HR zones if no zones are defined for this sport type? Usage like this: Toybox.UserProfile.getHeartRateZones(Toybox.UserProfile.getCurrentSport())
    Or is a fallback needed to get default zones?

    I tried using user profile in simulator. For that I have some questions, too:
    - Is there a possibility to set the HR zones for the simulator?
    - Using SDK 1.2.8 getHeartRateZones() uses zones from user profile (default values 84...185?). All ok. But after going back to SDK 1.2.7 and compiling again all works the same. Reading user profile gives the same HR-zone values. I would expect the the check "if Toybox.UserProfile has :getHeartRateZones" should give "false" as result or that calling getHeartRateZones() should raise a exeption. How is it possible to simulate a firmware that don't have SDK 1.2.8-support? I want to check if the existing app settings are used instead of user profile.

    Thanks for all answers :o
  • The SDK 1.2.8 is necessary on each device? So we have to wait that each device gets a firmware upgrade with the support of this SDK?

    The device firmware will need to support the getHeartRateZone() and getCurrentSport() APIs. It doesn't necessarily have to support 1.2.8 of the SDK.

    To be compatible with current firmwares the apps have to check if this functionality is possible on the device. Is this check enough: "if Toybox.UserProfile has :getHeartRateZones" ?

    Yes. You need some parens in there, but the idea is right.

    Using the getCurrentSport-method will read the default HR zones if no zones are defined for this sport type? Usage like this: Toybox.UserProfile.getHeartRateZones(Toybox.UserProfile.getCurrentSport())

    I don't *know* the answer to this, but my gut tells me that you'll get the default values if no zones were specified for the given sport.

    Is there a possibility to set the HR zones for the simulator?

    Not now. I'm pretty sure the driving factor in adding these APIs was the creation of the Strava Suffer Score data field. All of those APIs are needed to make for a positive user experience. I'm not *certain* that the zone information is actually being used by that app at this time, but I'm looking into it now.

    But after going back to SDK 1.2.7 and compiling again all works the same.

    There is evidence (see bin/api.db in the SDK) that these functions have been around for a while.

    How is it possible to simulate a firmware that don't have SDK 1.2.8-support?

    This isn't the cleanest code, but it should work...

    // set this to true if you want to try to use HR zone API
    var useHeartRateZoneAPI = false;

    class MyApp extends App.AppBase {

    function onStart() {

    if (useHeartRateZoneAPI) {
    useHeartRateZoneAPI = (Profile has :getHeartRateZones);
    }
    }

    // ....
    }


    class MyView extends Ui.View {

    // ....

    function onUpdate(dc) {

    if (useHeartRateZoneAPI) {
    // we wanted to use heart rate zone api, and the device supports it
    }
    else {
    // either we didn't want to use heart rate zone api, or the device does not support it
    }
    }

    // ....

    }
  • It should also be noted that although this was documented in 1.2.8, the API-DOCS online (http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/UserProfile.html) indicate it has been supported and stable since 1.2.6.