Connect IQ 2.2.0 Public Beta!

The Connect IQ 2.2.0 public beta is now available for download!

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 2.2.0 released October 6, 2016.
  • Download directly from our developer site at http://developer.garmin.com/connect-iq/sdk/

There is also a new Eclipse plug-in version to support some of the new features in the 2.2.0 SDK, so be sure to install it, too, if you use Eclipse as your development environment. You can easily check for plug-in updates in Eclipse by clicking Help > Check for Updates.

This beta will allow you to develop, simulate, and build apps to side-load to your devices that use the new 2.2.0 features, but the ability to export apps for submission to the app store is disabled. Once this release is out of beta, we'll re-enable the app export features.

General Changes

  • Change assertEquals(), assertEqualsMessage(), assertNotEquals(), and assertNotEqualsMessage() to use .equals() instead of the == operator.
  • Add access to saved waypoints, courses, and workouts on a device with the PersistedContent module. See the Programmer’s Guide for more details.
  • Deprecate the PersistedLocations module. Use PersistedContent.saveWaypoint() instead.
  • Add support for Bike Light status and control using ANT+.
  • Add support for Bike Power using ANT+.
  • Add support for bursting in Ant.GenericChannel.
  • Add support for downloading FIT files and loading them onto the device. See the makeWebRequest() section in the Programmer’s Guide for more details.
  • Allow a watch-app or widget to open another CIQ app or native application using System.exitTo(). See the Programmer’s Guide for more details.
  • Optimize apps by having the compiler fold constants into a single value. var number = 4 + 5; will now compile to var number = 9; instead of performing an add operation.
  • Clean up samples to only support devices that can run them.
  • Several API / documentation fixes
  • Add Call to Parent’s initialize() in RunNoEvil
  • Limit the size of an app’s mailbox from a partner app to 8kb.

Simulator Changes

  • Simulate navigation data.
  • Simulate Accel and Mag data.
  • Save waypoints created with PersistedContent.saveWaypoint().
  • Simulate APIs available to the device being run. For example, Pressure History is no longer available to the Forerunner 735 in the simulator.
  • Support pairing Bike Lights.
  • Fix UTF8 strings in memory window

Known Issues

  • If an Exception is thrown from a catch block, the finally block of the current try/catch/finally will not be executed.
  • Former Member
    Former Member over 8 years ago
    This will launch a native app and allow me to navigate to that waypoint


    There is a need in the inverse problem - use the system's waypoints (and routes) in the application. Now to make it necessary to duplicate the code that is already in the system. And most importantly - to keep their points can be only in the application settings. And this is 8K only!
  • Perez Smarden

    Are there plans to expose waypoint/track locations? I'm currently developing an app that displays a map at the user's location. It would be great to be able to overlay the current track. Only having access to waypoints' names seems pretty much useless... :confused:

    Take a look at the PersistedContent module in the API documentation that ships with the SDK (in the 'doc' directory). We have getters for each content type (courses, waypoints, etc.) that return iterators of its respective object. These do contain some basic info about the items (for example a waypoint object has an Id, Name, and an Intent), but we don't expose other specifics like the lat/lon. Instead, you can pass the objects to other apps through Intents.

    For example, if I download a waypoint via PersistedContent and then call:

    System.exitTo(myWaypoint.toIntent());


    This will launch a native app and allow me to navigate to that waypoint. On an Edge, this would display a list of my activity profiles (e.g. Run, Bike, Train, etc.), and allow me to choose one. Upon choosing, an activity would start and route me to the waypoint.

    There's more you can do, of course, but hopefully this illustrates the purpose behind PersistedContent.
  • Are there plans to expose waypoint/track locations? I'm currently developing an app that displays a map at the user's location. It would be great to be able to overlay the current track. Only having access to waypoints' names seems pretty much useless... :confused:


    There are plans for more functionality of this nature, especially since we're slowly growing the presence of Connect IQ on outdoor-specific devices like the Oregon 7xx. I don't have any specifics I can share right now, but it's definitely on our road map.
  • Loading properties returning null

    Just linked to the 2.2.0 Beta and now my property values return null. Whenever I upgrade the compiler, I do a regression test on a known working project (adding a space on a line to force recompilation). Now the simulator crashes with a null value returned when I load a property. Loading a resource string works, as does the App Setting Editor (since the simulator is not running, it doesn't send the values).

    Code:
    okString = Application.getApp().getProperty("okGoal");
    Toybox.System.println(okString);

    Output:
    null

    Thoughts?

    Dave
  • DavePratt00-

    When you update the SDK, your old .set and .str files are likely removed from the sim's temp directory, so when you try to access the key, it won't be there and you get null.

    That's the same thing that will happen when you do a fresh install of a .prg.

    If you're using app settings (.set file stuff), you want to have the property defined with a default, such as:

    <property id="okGoal" type="string">My Default</property>

    If you're just using the Object Store (.str file stuff), you need to handle the null, as the key won't have a value until you have written at least once in the code.

    With both the ObjectStore and app settings (properties) you want to check for null, and for app settings, it's good to check the type you get back. See:
    https://forums.garmin.com/showthread.php?359183-New-Developer-FAQ-2
  • Is HTTP_RESPONSE_CONTENT_TYPE_GPX implemented in 2.2 simulators?

    I am trying to get the new makeWebRequest with HTTP_RESPONSE_CONTENT_TYPE_GPX to work in the 2.2 beta SDK, but not seeing it working on the simulators (eg Edge 820). Should it? Code is:

    var url = "http://foo.bar/test.gpx";
    Comm.makeWebRequest(url, null, {:method => Comm.HTTP_REQUEST_METHOD_GET, :responseType => Comm.HTTP_RESPONSE_CONTENT_TYPE_GPX}, method(:onWebRequest));
    ...
    function onWebRequest(responseCode, data) {
    Sys.println("Code:"+responseCode);
    Sys.println(data);
    }

    onWebRequest does not get called.

    Manifest has:
    <iq:uses-permission id="Communications"/>
    <iq:uses-permission id="PersistedContent"/>

    Any ideas?

    Thanks
  • Looks like a bug. I've reproduced in the sim for HTTP_RESPONSE_CONTENT_TYPE_GPX. The other data types seem to work without a problem.
  • Wessobrunner St PRIVATA

    Looks like a bug. I've reproduced in the sim for HTTP_RESPONSE_CONTENT_TYPE_GPX. The other data types seem to work without a problem.


    OK thanks Travis, I'll be on the lookout for a fix in the next release of the beta SDK.
  • Just to be clear, I don't have any idea if, or when, you should expect it will be fixed. I've just verified the problem and reported it to the ConnectIQ folks.
  • Just to be clear, I don't have any idea if, or when, you should expect it will be fixed. I've just verified the problem and reported it to the ConnectIQ folks.


    Understood, yes :)