jungles files and CIQ2 vs CIQ3

What's the best way to use jungle file to differentiate between device which support CIQ2 and device which support CIQ3 ?
did we need to wrote a rule per device ? can it be only for "class" device ?

thanks
  • It's per device, but not quite that simple.

    There are some CIQ 2.x.x devices that won't get CIQ 3.0.x, and IIRC, that's the vahr,fr735,edge520, and edge1000. The Oregon/Rino/GPSmap66 just recently got CIQ 3.0.x, and I believe they were the last to move, but there was a time when not all devices had 3.0.x that would get 3.0.x. On top of that, ROW devices tended to be moved some time before APAC devices.

    So based on what you are doing, you may need some runtime checks, where there's a possibility that the APAC device might not have moved to the new version while the ROW device has. An example here could be the mapping API, where on the ROW version, it had 3.0.x and the mapping API, while the APAC version, it's still 2.x.x and doesn't have the mapping API yet. I typically do a "has" check for things like this when an app starts.
  • so it seem better to use an "has" check when need, instead of creating multiple source and lots of line in a jungle file ?
  • It really depends on what's different. For example, one of my apps uses the mapping API on devices that support it, so I build with that code instead of my breadcrumb code, but to handle the possible APAC/ROW difference, I also have a "has" for mapping, so I can display a message and not get an app crash. You can't do separate builds of APAC and ROW versions of the same device.

    In the same app, I use a "has" for things like floors, where it's not a CIQ2 vs CIQ3, but if the device has a baro altimeter or not. (no floors without a baro), but floors is a fairly simple code difference and pretty much:

    if(hasFloors) {display floors}
    else {display "Not available"}
  • Typically jungles would be used to configure things that you know at application build time. Things like screen size/shape, available memory, or availability of buttons/tap controls are common examples. Jungles are useful when you know what devices you are targeting and you know what code you want to use for each, you expect this will not change, and if it does change you're willing to modify and re-build your app to deal with it.

    The has checks are normally used for things that may change after the app is built. Things like the current ConnectIQ version that is supported on a device are pretty flexible, except for devices that have been announced to not be getting upgrades.

    Travis