Connect IQ 1.2.2 SDK Available!

Connect IQ SDK version 1.2.2 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 v1.2.2 released January 6, 2015.
  • Download directly from our developer site at http://developer.garmin.com/connect-iq/sdk/


General Changes:
  • Improve API documentation based on feedback.
  • Replace the Input sample with a new version which tests more permutations of input than the original.
  • Add support for “Tall Watch” profile, a new/upcoming device which has new screen dimensions.
  • Add better documentation for each released sample within the README.
  • Extend Primates sample to use a BehaviorDelegate and demonstrate multiple types of bitmaps.
  • Update the Layouts sample to have a blue triangle as the background, and clean up build warnings.
  • Add check to make sure the type of the application being compiled is supported by the device that’s being targeted.
  • Add 16-bit alpha channel support to the resource compiler for compatible devices (Edge only).
  • Add ability to preview data fields on the non-active profile without running them (Edge only).
  • New memory management system which improves object creation/deletion performance by up to 3x (Edge only).
  • Allow comments as last line of a Monkey C file.
  • Deprecate loadProperties() and saveProperties().
  • Allow Unicode support for custom fonts.
  • Replace the Weather sample with JsonRequest which prints arguments duplicated and returned by httpbin.org, a free service.

Simulator Changes:
  • Fix the encoding of Unicode characters in Communications.encodeURL() in the Simulator.
  • Correct an issue that sometimes caused a System Error in the simulator when loading an app.
  • Fix the data contained in ActivityMonitor.Info when Activity Tracking is disabled in the simulator.
  • JSON responses greater than 512 characters are now allowed.
  • Correct an issue with the Picker sample that caused the initial screen to not display correctly.
  • Prevent an empty string from being chosen in the TextPicker, which emulates behavior on devices.
  • The Simulator will now issue callbacks with negative Communications status codes.
  • Fix Simulator crash when passing C format specifiers to print()/println().
  • The Simulator now requires a minimum of 1 second when choosing a duration with a number picker.
  • Fix incorrect purple (palette) definitions for semi-round watch, FR630, FR235 and FR230.
  • Add landscape mode setting which allows Edge devices that support a landscape rotation (90/270 degrees) to run data fields in that mode.
  • Resolve several crashes with the Simulator Memory Window.
  • Support the FR230/235/630 in the Picker sample.
  • Allow for simulating and FIT file playback of swim lap data.
  • Add Fenix 3 HR, tactix Bravo and new APAC device support.
  • Ensure onUpdate() is called during a push/pop/switch view operation.
  • Only call onStop() once on during application shut-down.
  • Do not respond to the ENTER key in Menus on devices that do not map it to onSelect().
  • If an ON_BACK behavior is issued by pressing the ESC key, pop the view if the key is not used, i.e. false is returned by the input or behavior delegate. Emulates the current device behavior under these circumstances.
  • Fix several crashes occurring in various circumstances when using the Number Picker.

API Additions:
  • Add support for heart rate history on devices with wrist-based heart rate monitoring; see ActivityMonitor.getHeartRateHistory() for more details. The FR235 will support this new API at a later date.

Bug Fixes:
  • Fix an issue preventing empty string resources from being defined. now works as expected.
  • Fix an issue that caused devices to reboot when deleting a class that used WeakReference.
  • A warning is now generated generated with Module.className.init(). Note: Module name is not checked against the module to which the parent class belongs.
  • If a class does not initialize its parent class, the compiler now includes a relevant line number for that warning - the line of the class’s initialize if it exists and the line of the class declaration if it doesn’t.
  • Adjust makeJsonRequest() to support Unicode in addition to 1252 as the source code page.
  • Fix hidden keyword functionality in the compiler, which will now generate a symbol not found error when a hidden item is accessed out-of-scope.
  • Exception errors now correctly print the call-stack.
  • Defines a new error “Invalid Resource” which is issued when a bitmap is loaded that is not compiled for the current system.
  • Invalid permissions errors will now display a “Permission Required” error versus the previous “Symbol Not Found Error”.
  • Always ensure a call stack is printed when a Monkey C application crashes.
  • Toybox::WatchUi::DataField::getBackgroundColor() will now return either COLOR_WHITE or COLOR_BLACK.
  • Allow for :method to not be in the options hash, if passed into makeJsonRequest. This allows it to be null as it defaults to GET.
  • Fix a crash that occurred when pushing a menu with no items (empty).
  • Prevent pushing views in watch-faces or data-fields and generate an error.
  • Time.today() now returns the locally adjusted time of the beginning of the day in Unix time.
  • Fix several issues with stack trace handling.
  • Prevent the system from running out of timers if both a widget and application are running.
  • Fix System.exit() so that it doesn’t “crash” the application or fail to exit.

Known Issues:
  • If an Exception is thrown from a catch block, the finally block of the current try/catch/finally will not be executed.
  • The compiler is processing custom fonts in a way that allows for more data to be specified, but hand-made font files may display slightly different.
  • Number fonts on the Edge 520 have not yet been finalized.
  • Question of understanding:

    The epix fw is on sdk 1.2.1. If developers create any new apps etc. or updated their apps etc. to sdk 1.2.2, these apps etc will not run on the epix, right?
  • Former Member
    Former Member over 9 years ago
    A lot of problems with SDK 1.2.1

    Hello,
    Firstly, sorry for my english, I’m french.

    I have a lot of problems with SDK 1.2.2.
    - Out of memory (I have reinstalled the plug-in Eclipse on Mac and the problem is not solved)
    - The format("%d") statement does not supported by SDK 1.2.2.
    - The statement var dureeSec = info.elapsedTime != null ? info.elapsedTime / 1000 : 0; cause a crash when I use var duress in the code : expected Long/... null provided.

    The save code on SDK 1.2.1. works properly.

    Do you have issues ?
    Thanks
  • Object Store not persisting values

    Hi Guys,

    Writes to object store are being ignored by simulator running 1.2.2

    No values saved with setProperty(key, value) are persisted. It seems that the values are kept in memory but not saved to disk.

    CTRL-O always shows a message informing the store has no values.

    Someone expiriencing the same problem?
    Any workaround?

    I reverted to 1.2.1 and everything is ok

    Thanks!
  • Try clearing out the temp directory (which should be at $TMPDIR/GARMIN on a Mac or %TEMP%\GARMIN on Windows) and see if that helps.


    I have this same problem. Clearing TMP helps but it is bit of a pain because I need to do that every time I build. I have Eclipse Mars.1, maybe that is a problem? 1.2.1 worked fine, though.
  • Thanks JRUUTH0

    I will test the workaround.

    I had the Object Store problem in Eclipse Luna and Mars.
  • With the Object store in the sim, it doesn't save to disk until the program exits (at least in some cases, like watch-apps). If you "ctrl-k" the app in the sim, does it then get saved? (it's been this way since 1.1.2 IIRC).

    The "ctrl-o" window in the sim also seems to only display 8 items, and those may or not be in the object store (the .STR) as it also shows the properties in the .SET (often the same things you get to with "App Settings Editor" in Eclipse) . In an app I'm currently running, all I'm seeing are the first 8 in the .SET and none that are in the .STR, for example, but the app is showing that I am using the .str (Object Store) based on a couple options I saved in the OS)

    If you think something isn't being saved, you can check it out by running your app, ctrl-k it in the sim after changing something in the Object Store, and then running it again, and see if the new setting is used.

    Before the "ctrl-o" window existed, I'd do a hex dump of the .STR to see if my keys existed in the .STR.

    Why the ctrl-o window shows the items in the .SET as well as the .STR, I don't know, as well as why it's limited to 8 items, but it could be your app's working fine, but you just don't see it in the ctrl-o window.
  • Broken font

    1.2.2 has broken how my fonts work.

    All the individual characters are displayed in different positons to before.

    Instead of

    12:34

    I now get

    1 2: 3 4

    and some fonts show

    34

    WHY!?!

    I have not changed the fonts or the code, just goen from 1.2.1 to 1.2.2.

    Do I have to recreate ALL my fonts again!?!! Argh!
  • Re-importing the font with "Force offsets to zero" option set in true helped. Otherwise font didn't look like on 1.2.1.


    Re-importing to where? How? Where is this option?


    Thanks Garmin, for breaking all my fonts.
  • It's still a mess. I have a big font which on 1.2.2 becomes much wider, whatever padding I specify it is still ~10% wider than on 1.2.1. I was able to fix that only by setting all paddings to 0 and manually reducing xadvance values by 4px. Moreover, .getTextWidthInPixels() doesn't work correctly now, at least for me with custom fonts. :mad:


    All my layouts usw the gettextwidthinpixels so 1.2.2 has broken all my apps. Is this going to be fixed?
  • This isn't bug--we just started reading more of the font available font attributes. In many ways, this was more of a bug fix, as described by Ken:

    I can say from looking at this today that we were not using all of the font family information (what's defined in the first two lines in a fnt file) with the new system but we were using all/more of the values defined for each individual glyph. There is a change in review at the moment that will take the padding information for the font family and apply it to the glyphs. This should begin to fix some of the issues being seen.

    There is still going to be some spacing issues with the new system because tools like BMFont also depend on kerning values to lay characters out correctly. The watches themselves simply don't support that so we can't do a whole lot there. These issues can be handled on a character-by-character basis within the fnt file by modifying the xadvance value for individual characters in the fnt file.

    Ultimately this new custom font system behaves more like a font (with the added benefit of supporting non ASCII characters) but it's not perfect. We decided to go forward with the new system because we think there is more value in having support for non ASCII characters in custom fonts. All apps with custom fonts on the store will still work as the previously did because this change is compiler only. Developers will just have to update their apps to support the new custom font system when they go to release an update to an existing app.


    You should be able to address the problem you're seeing by running your custom fonts through the BMFont tool and adjusting the xadvance.