SDK 6.2.0

This seems weird. Big jump to SDK 6? And a dramatic reduction in size?

NOTE: In Eclipse I had to go into PREFERENCES and manually point to the new SDK. The SDK Manager did not update that from SDK 4.2

    • Underscores not allowed as first character in resource IDs.

    Generally, resources have not allowed leading underscores on IDs since 2017.  I'm interested to know exactly which kind of resource you're assigning these IDs to.

    Here is one of my resources/settings XML which generates an error for each line:
    (to clarify: The string ID in settings and in resources-language generate the error!)

    ERROR: edge530: C:\Garmin_IQ_Projekte\EdgeAllinOne58\resources\settings\settings.xml:6: Invalid resource '_isColored' in attribute 'id'. Please use a valid Monkey C identifier.


    settings.xml
    <resources>
    
    	<strings>
    
    		
    		<string id="_isColored">colored main figures?</string>
    		<string id="_isPower">show power gauge? (or Cadence)</string>
    		<string id="_caloriesToggle">primary display Calories? (or Elevation)</string>
    		<string id="_isPozone7">show time in Powerzone 7?</string>
    		<string id="_isAvgPower0">average Power and NP without zero values?</string>
    		<string id="_cadMax">maximum Cadence on gauge</string>
    		<string id="_hrMax">maximum Heartrate on gauge</string>
    
    		<string id="_poZ0">minimum for PowerZone 1</string>
    		<string id="_poZ1">maximum for PowerZone 1</string>
    		<string id="_poZ2">maximum for PowerZone 2</string>
    		<string id="_poZ3">maximum for PowerZone 3</string>
    		<string id="_poZ4">maximum for PowerZone 4</string>
    		<string id="_poZ5">maximum for PowerZone 5</string>
    		<string id="_poZ6">maximum for PowerZone 6</string>
    		<string id="_poZ7">maximum for PowerZone 7</string>
    		<string id="_poMax">maximum Power on gauge</string>
    
    		<string id="_gradDigits">Grade with one decimal place?</string>
    		<string id="_gradSample">Grade sample in Seconds (5 - 20)</string>
    		<string id="_timerIndicator">show indicator for running timer</string>
    
    		<string id="_gearArt">Derailleur: 0...don't show, 1...mechanical, 2...electric, 3...el. front+rear</string>
    		<string id="_inStrG">mech. Gear: wheel circumferenc cm; teeth of chainring; smallest cog; next; next; biggest cog; </string>
    		<string id="_showIndex">show gear index? (or teeth number)</string>
    
    		<string id="_isRadar">I use Varia Radar</string>
    
    		<string id="_showBatteryGC">show Edge Battery % in GC? (reboot your Edge!)</string>
    		<string id="_showShiftGC">show Shift Index in GC? (reboot your Edge!)</string>
    
    		<!--
    		<string id="_showAscentGC">show Total Ascent in GC? (reboot your Edge!)</string>
    		<string id="_showGradeGC">show Grade in GC? (reboot your Edge!)</string>
    		-->
    
    		<string id="_sportOption1">================================   Optional Activity Sport 1:</string>
    		<string id="_sportOption2">================================   Optional Activity Sport 2:</string>		
    		<string id="_sport0">no optional</string>
    		<string id="_sport1">Road</string>
    		<string id="_sport2">Mountain</string>
    		<string id="_sport3">e-Mountain</string>
    		<string id="_sport4">e-Bike</string>
    		<string id="_sport5">Commuting</string>
    		<string id="_sport6">Gravel</string>		
    		<string id="_sport7">CycloCross</string>		
    		<string id="_sport8">Indoor</string>		
    
    	</strings>
    
    	<properties>
    		<property id="_isColored" type="boolean">true</property>
    		<property id="_isPower" type="boolean">true</property>
    		<property id="_caloriesToggle" type="boolean">true</property>
    		<property id="_isPozone7" type="boolean">false</property>
    		<property id="_isAvgPower0" type="boolean">false</property>
    		<property id="_cadMax" type="number">130</property>
    		<property id="_hrMax" type="number">200</property>
    
    		<property id="_poZ0" type="number">45</property>
    		<property id="_poZ1" type="number">71</property>
    		<property id="_poZ2" type="number">95</property>
    		<property id="_poZ3" type="number">128</property>
    		<property id="_poZ4" type="number">153</property>
    		<property id="_poZ5" type="number">178</property>
    		<property id="_poZ6" type="number">300</property>
    		<property id="_poZ7" type="number">500</property>
    		<property id="_poMax" type="number">300</property>
    
    		<property id="_gradDigits" type="boolean">false</property>
    		<property id="_gradSample" type="number">12</property>
    		<property id="_timerIndicator" type="boolean">true</property>
    
    		<property id="_gearArt" type="number">0</property>
    		<property id="_showIndex" type="boolean">true</property>
    		<property id="_inStrG" type="string">220; 30; 10; 12; 14; 16; 18; 21; 24; 28; 32; 36; 42; 50;</property>
    
    		<property id="_isRadar" type="boolean">false</property>
    
    		<property id="_showBatteryGC" type="boolean">false</property>
    		<property id="_showShiftGC" type="boolean">false</property>
    
    		<!--
    		<property id="_showAscentGC" type="boolean">false</property>
    		<property id="_showGradeGC" type="boolean">false</property>
    		-->
    
    		<property id="_sportOption1" type="number">0</property>
    		<property id="_isPower1" type="boolean">true</property>
    		<property id="_isRadar1" type="boolean">false</property>
    		<property id="_gearArt1" type="number">0</property>
    		<property id="_inStrG1" type="string">214; 34; 10; 12; 14; 16; 18; 21; 24; 28; 32; 36; 42; 50;</property>
    		
    		<property id="_sportOption2" type="number">0</property>
    		<property id="_isPower2" type="boolean">true</property>
    		<property id="_isRadar2" type="boolean">false</property>
    		<property id="_gearArt2" type="number">0</property>
    		<property id="_inStrG2" type="string">230; 32; 11; 13; 15; 17; 19; 21; 24; 28; 32; 36;</property>
    
    
    	</properties>
    
    	<settings>
    		<setting propertyKey="@Properties._isColored" title="@Strings._isColored">
                	<settingConfig type = "boolean">
    			</settingConfig>
    		</setting>
    		<setting propertyKey="@Properties._isPower" title="@Strings._isPower">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    		<setting propertyKey="@Properties._caloriesToggle" title="@Strings._caloriesToggle">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    		<setting propertyKey="@Properties._isPozone7" title="@Strings._isPozone7">
                	<settingConfig type = "boolean" />
    		</setting>
    		<setting propertyKey="@Properties._isAvgPower0" title="@Strings._isAvgPower0">
                	<settingConfig type = "boolean" />
    		</setting>
    		<setting propertyKey="@Properties._poZ0" title="@Strings._poZ0">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ1" title="@Strings._poZ1">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ2" title="@Strings._poZ2">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ3" title="@Strings._poZ3">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ4" title="@Strings._poZ4">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ5" title="@Strings._poZ5">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ6" title="@Strings._poZ6">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poZ7" title="@Strings._poZ7">
                	<settingConfig type = "numeric" min = "10" max = "600" />
    		</setting>
    		<setting propertyKey="@Properties._poMax" title="@Strings._poMax">
                	<settingConfig type = "numeric" min = "100" max = "500" />
    		</setting>
    		<setting propertyKey="@Properties._cadMax" title="@Strings._cadMax">
                	<settingConfig type = "numeric" min = "100" max = "200" />
    		</setting>
    		<setting propertyKey="@Properties._hrMax" title="@Strings._hrMax">
                	<settingConfig type = "numeric" min = "150" max = "250" />
    		</setting>
    
    
    		<setting propertyKey="@Properties._gradDigits" title="@Strings._gradDigits">
                	<settingConfig type = "boolean" />
    		</setting>
    		<setting propertyKey="@Properties._gradSample" title="@Strings._gradSample">
                	<settingConfig type = "numeric" min = "5" max = "20" />
    		</setting>
    		<setting propertyKey="@Properties._timerIndicator" title="@Strings._timerIndicator">
                	<settingConfig type = "boolean" />
    		</setting>
    
    
    		<setting propertyKey="@Properties._gearArt" title="@Strings._gearArt">
                	<settingConfig type = "numeric" min = "0" max = "3" />
    		</setting>
    
    		<setting propertyKey="@Properties._showIndex" title="@Strings._showIndex">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._inStrG" title="@Strings._inStrG">
                	<settingConfig type = "alphaNumeric" />
    		</setting>
    		
    		<setting propertyKey="@Properties._isRadar" title="@Strings._isRadar">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._showBatteryGC" title="@Strings._showBatteryGC">
                	<settingConfig type = "boolean">
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._showShiftGC" title="@Strings._showShiftGC">
                	<settingConfig type = "boolean">
    			</settingConfig>
    		</setting>
    
    		<!--
    		<setting propertyKey="@Properties._showAscentGC" title="@Strings._showAscentGC">
                	<settingConfig type = "boolean">
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._showGradeGC" title="@Strings._showGradeGC">
                	<settingConfig type = "boolean">
    			</settingConfig>
    		</setting>
    		-->
    
    		<setting propertyKey="@Properties._sportOption1" title="@Strings._sportOption1">
                	<settingConfig type = "list" >
    					<listEntry value = "0">@Strings._sport0</listEntry>
    					<listEntry value = "7">@Strings._sport1</listEntry>
    					<listEntry value = "8">@Strings._sport2</listEntry>
    					<listEntry value = "47">@Strings._sport3</listEntry>
    					<listEntry value = "28">@Strings._sport4</listEntry>
    					<listEntry value = "48">@Strings._sport5</listEntry>
    					<listEntry value = "46">@Strings._sport6</listEntry>
    					<listEntry value = "11">@Strings._sport7</listEntry>
    					<listEntry value = "6">@Strings._sport8</listEntry>
    
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._isPower1" title="@Strings._isPower">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._isRadar1" title="@Strings._isRadar">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._gearArt1" title="@Strings._gearArt">
                	<settingConfig type = "numeric" min = "0" max = "3" />
    		</setting>
    
    		<setting propertyKey="@Properties._inStrG1" title="@Strings._inStrG">
                	<settingConfig type = "alphaNumeric" />
    		</setting>
    
    
    		<setting propertyKey="@Properties._sportOption2" title="@Strings._sportOption2">
                	<settingConfig type = "list" >
    					<listEntry value = "0">@Strings._sport0</listEntry>
    					<listEntry value = "7">@Strings._sport1</listEntry>
    					<listEntry value = "8">@Strings._sport2</listEntry>
    					<listEntry value = "47">@Strings._sport3</listEntry>
    					<listEntry value = "28">@Strings._sport4</listEntry>
    					<listEntry value = "48">@Strings._sport5</listEntry>
    					<listEntry value = "46">@Strings._sport6</listEntry>
    					<listEntry value = "11">@Strings._sport7</listEntry>
    					<listEntry value = "6">@Strings._sport8</listEntry>
    
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._isPower2" title="@Strings._isPower">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._isRadar2" title="@Strings._isRadar">
                	<settingConfig type = "boolean" >
    			</settingConfig>
    		</setting>
    
    		<setting propertyKey="@Properties._gearArt2" title="@Strings._gearArt">
                	<settingConfig type = "numeric" min = "0" max = "3" />
    		</setting>
    
    		<setting propertyKey="@Properties._inStrG2" title="@Strings._inStrG">
                	<settingConfig type = "alphaNumeric" />
    		</setting>
    
    
    
    	</settings>
    
    
    </resources>
    

    But - ok - it is not that much work to change the IDs if they are forbidden.
    Strange, that it worked until SDK 4.x.x.

    Thank you!

  • Thank you for the detailed answer.
    Just to clarify some things (maybe just for me).

    For both methods drawBitmap() and drawBitmap2() the documentation states "The source color palette must be a subset of the destination color palette".

    When an (auto) palette is applied to a bitmap which is drawn to a Dc and the Dc is using the system palette I think this does not violate the rule in the documentation. -> The call to drawBitmap does not fail.
    Only drawBitmap2() fails regardless whether the option dictionary is empty or whether it contains parameters.

    The exact exception text is
    Exception: Source must not use a color palette
    so this could very well be a different exception than InvalidpaletteException.
    At least it is raised for a different reason.

    I will look into the packingFormat options.

    I'm wondering if the bitmaps without palette when loaded into the graphic pool will consume more memory even when applying a packingFormat with compression.

    ...But this is a question for the other thread.

  • I had a reply posted and realized I'd mis-stated some things, so let me try this again. Blush 

    The compiler will always apply an auto palette unless the automaticPalette attribute on the bitmap resource is set to false. The assumption I had made that you were receiving an InvalidPaletteException turns out to be a red herring. What was really happening was you were getting an InvalidValueException because the source image had a palette applied. This is not documented, but will be.

    drawBitmap2() will throw this exception when attempting to render an image with a palette on products that have a GPU. Without getting to far into the weeds, the GPU needs to have all colors available in order to do the various transforms that drawBitmap2() is capable of. This same condition is not imposed on drawBitmap(), which is why you weren't seeing exceptions when rendering the same bitmap with that method.

    There are several nuances here that aren't very clear in the API docs, but I had a good discussion with the engineering team this morning about this, and I believe most of your questions about this particular issue will be addressed by doc updates. 

  • I confirm that println does not display data in SDK 6.2.0 but works as expected in SDK 4.2.4.
    Eclipse IDE for Eclipse Committers
    Version: 2018-09 (4.9.0)
    Build id: 20180917-1800

    However, when println fires, it switches to the console (if another tab was active)

  • The system inscriptions at the top of the console are different:

    For 4.2.4 display "New configuration [Connect IQ App] run 1"

    For 6.2.0 display "<terminated> New configuration [Connect IQ App] run 2"

  • Thank you very much for your clarifications. It is now crystal clear to me.
    The updated doc will certainly be useful to many other developers as well.

  • I'm not sure I'm clear about this—are println() statements switching to the console but not displaying information? We no longer support Eclipse, so this will not be addressed specifically for the Eclipse plugin. However, if println() is not printing to the "console" while using monkeydo in a CLI or is not printing to console in VS Code, we'd need to investigate further.

    The complaint in this thread is that println() is not working with monkeydo in a CLI, which we have not been able to reproduce.

  • Edge devices crashing in sim when using data fields

    This issue has seems to have an additional effect. It is actually not possible to bring a new version of a complex data field to a real x40 device.

    For a data field build with sdk 6.2.0 export and upload to the store is working without any problem. But download to my Edge 1040 is not possible. There is a message that my Edge has to be updated before download. I guess that is because FW 17.29 does not support ciq 4.2.0.

  • YES - same Problem here!

    I opened a thread about this problem here:

    https://forums.garmin.com/developer/connect-iq/f/discussion/337703/problem-with-sdk-6-2-0-datafields-and-edge-1040

    I guess that is because FW 17.29 does not support ciq 4.2.0.

    Funny thing is: I can download this 6.2.0 store datafields to my Edge 1030 Plus (CIQ Vers. 3.3.6) but not to Edge 1040 (CIQ Vers 4.2.0)!

  • This problem with Edge app installation was due to an incorrect minimum required firmware version we had published in the device configs. We've already verified the fix and are updating the configs for Edge 540, 840, and 1040. Just update the device configs with SDK Manager, rebuild your apps, and update the store listings. Apologies for the inconvenience!