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!
  • Hi,

    I also upgraded today to the new SDK and realized that the info object returns only null for the averageSpeed. I played back the very same fit file as usual. Is this a known bug? Ir worked pretty well with the SDK before.

    function compute(info) {

    Sys.println(""+info.averageSpeed+" "+info.currentSpeed);
    }


    Outputs this:
    null 0.102638
    null 1.996768
    null 3.181766
    null 3.499009
    null 3.499009
    null 3.806922
    null 3.806922
    null 3.582986
    null 3.349718
    null 3.349718
    null 3.349718
    null 3.321726
    null 3.349718
    null 3.349718
  • I'm seeing avg speed fine in the 2.1.2 sim, in a watch-app, with my .fit files.

    In 2.1.2, and a data field, did you click on the "start" button for the device in the sim? That's new in 2.1.2. You can also click on the lap button to get your "onTimerLap() code executed. There are also ways to do things under Data Filed>Timer in 2.1.2
  • Former Member
    Former Member over 9 years ago
    Actually you do have them. In your app class you'll see it as something like:


    class MyWatchApp extends App.AppBase {
    function initialize() {
    AppBase.initialize();
    }

    //! onStart() is called on application start up
    function onStart(state) {
    }

    //! onStop() is called when your application is exiting
    function onStop(state) {
    }


    I do not change my App file .. this is how it is by default. But the error has gone away in 2.1.2 at least (but I have not tested all my apps) .. I only use ver 1.2.9 as there is no reason to use anything newer. But my user settings are messed .. still potentially an issue.

    //! onStart() is called on application start up
    function onStart() {
    }

    //! onStop() is called when your application is exiting
    function onStop() {
    }
  • OK, this did the trick. Thanks for your support.

    I'm seeing avg speed fine in the 2.1.2 sim, in a watch-app, with my .fit files.

    In 2.1.2, and a data field, did you click on the "start" button for the device in the sim? That's new in 2.1.2. You can also click on the lap button to get your "onTimerLap() code executed. There are also ways to do things under Data Filed>Timer in 2.1.2
  • I do not change my App file .. this is how it is by default. But the error has gone away in 2.1.2 at least (but I have not tested all my apps) .. I only use ver 1.2.9 as there is no reason to use anything newer. But my user settings are messed .. still potentially an issue.


    Ok, a couple things here.. When you go to a 2.1.x SDK, you'll have to edit onStart() and onStop() and add the parameter or you'll see errors (it doesn't cause a problem if they are there in 1.2.x). The templates didn't have the parameter in them before one of the later 1.2.x SDKS (or maybe it was 2.1.0... I forget!)

    When you mention a problem with app settings, this file also comes into play so that you can change app-settings while running. It's where you put

    onSettingsChanged()

    Something like this
    class MyWatchApp extends App.AppBase {

    function initialize() {
    AppBase.initialize();
    }

    function onSettingsChanged() {
    // do what you need to do here to get the new settings
    }


    //! onStart() is called on application start up
    function onStart(state) {
    }

    //! onStop() is called when your application is exiting
    function onStop(state) {
    }

  • Former Member
    Former Member over 9 years ago
    Ok, a couple things here.. When you go to a 2.1.x SDK, you'll have to edit onStart() and onStop() and add the parameter or you'll see errors (it doesn't cause a problem if they are there in 1.2.x). The templates didn't have the parameter in them before one of the later 1.2.x SDKS (or maybe it was 2.1.0... I forget!)


    So .. what parameter do I need to put in there for 2.1.x to work ?
  • Just a further remark: My iq file size raised from around 40 k to 70 k. Ok, I did some changes in the resources file, but IMO that's really a lot. Is this just normal?
  • So .. what parameter do I need to put in there for 2.1.x to work ?


    The templates now use "state" for the name of the parameter. It's just a dummy parameter right now, but needs to be there starting with 2.1.x.
  • Just a further remark: My iq file size raised from around 40 k to 70 k. Ok, I did some changes in the resources file, but IMO that's really a lot. Is this just normal?


    Are you sideloding? With a release or non-release (debug symbols included) build?
  • 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?