Connect IQ 2.1 SDK Preview!

The Connect IQ version 2.1 preview SDK is now available on the developer site!

We're excited about this release because it adds a bunch of new features that many Connect IQ developers have been asking for, like custom FIT recording, OAuth, Widget & App support for Edge products, and more! You can find out all about it and download it here:

http://developer.garmin.com/index.php/blog/post/connect-iq-2-biker-monkey

Since this is a preview, you won't be able to export apps for submission to the app store, but you can build apps to side load to your own device for development and testing purposes. Please give it a try! If you have feedback or notice any bugs, you can post to this forum or send your comments to the Connect IQ team at [EMAIL="[email protected]"][email protected][/EMAIL].

Thanks!

- The Connect IQ Team
  • Former Member
    Former Member over 9 years ago
    Cheers Jim, I wasn't quite sure. I only just started seriously looking at 2.1.0 just now. I was unsure because http://developer.garmin.com/index.php/blog/post/connect-iq-2-biker-monkey indicates that "You can use the new features with Garmin Connect Mobile for Android." So I thought perhaps I might be able to test it, since settings work with Connect Mobile, and because I had a device that supported the new betas listed on that same page.
  • Bug in 2.1: in simulator setPenWidth other than 1 causes random effects with drawCircle function.

    dc.setColor(Gfx.COLOR_BLUE, Gfx.COLOR_WHITE);
    dc.drawCircle(150, 50, 10);

    dc.setColor(Gfx.COLOR_RED, Gfx.COLOR_WHITE);
    dc.setPenWidth(2);
    dc.drawCircle(100, 50, 10);


  • This is an old issue that has yet to be fixed. A common workaround is to draw multiple circles with increasing radii in a loop...

    function drawCircle(dc, x, y, radius, penWidth) {

    for (var i = 0; i < penWidth; ++i) {
    dc.drawCircle(x, y, radius + i);
    }
    }

    // or the other way, which requires you to know the background color
    function drawCircle(dc, x, y, radius, penWidth, centerColor) {

    dc.fillCircle(x, y, radius + penWidth);

    dc.setColor(centerColor, Gfx.COLOR_TRANSPARENT);

    dc.fillCircle(x, y, radius);
    }


    While it isn't perfect (there will be pixel-wide gaps between the circles in some areas), it does work well enough.
  • BTW, odd things also show in the sim with drawRectangle and a penwidth>1. This too has been reported in the past.

    As an alternate to what Travis suggested, is to draw a filled circle the size you want, in the color you want, and then draw a second filled circle using the background color on top of it, but smaller.
  • draw a filled circle the size you want, in the color you want, and then draw a second filled circle using the background color on top of it, but smaller.

    Ah yes. Thanks for the reminder. This provides in a much better result.
  • Travis, I got to admit... I was working on an analog watchface this past weekend, and wanted the outer band to be one color and the face a different one.. And the lightbulb went off in my head! :)
  • Bug is Still alive, still alive. Pretty joke in documentation.
    - (Boolean) stillAlive

    Return if the reference is still alive.

    Returns:
    (Boolean) — true if object is still alive, false otherwise. When you are dead I will be STILL ALIVE I feel fantastic and I am STILL ALIVESince:
    1.2.0


    Then Garmin must correct documentation, as setPenWidth does not work. And it will never work, as some devices as Epix still use 1.2.3 version. I'd make this function deprecated.
    //dc.setPenWidth(1); // useless command, bug in CIQ - do not use at all, causes drawing issues
    Maybe we need to use Valyrian to send such bug reports?
  • Former Member
    Former Member over 9 years ago
    I am finding that the simulator does not play FIT files properly in 2.1.0 beta .. but play fine in 1.2.9

    They are created with a Forerunner 610, and in the beta it does not update the data on the screen every second as before.
  • Former Member
    Former Member over 9 years ago
    I am finding that the simulator does not play FIT files properly in 2.1.0 beta .. but play fine in 1.2.9

    They are created with a Forerunner 610, and in the beta it does not update the data on the screen every second as before.


    Data fields can record activities and respond to timer events now, but this also means you have to control the timer for them. Make sure you are starting the timer after you start playing back the fit file. This can be done by clicking the keys on the simulated device, or by using the menu options at "Data Fields->Timer"
  • VivoactiveHRGuy-

    What is it you see that's weird in playing back a .fit? I've played back many with smart and 1-sec recording, and the only thing I see that's different is elapsedDistance - it's incorrect in the 2.1.0 simulator. I reported that one to Garmin and I'm sure will be fixed.