Ticket Created
over 2 years ago

WERETECH-12673

Improve documentation: Add api levels and system levels to Device Reference

Please add information about the possible system level and api level each device can have to:

https://developer.garmin.com/connect-iq/reference-guides/devices-reference/

For example:

Fenix 6:

min system: 4

max system: 5

min api: 3.2.0

max api: 3.3.*

(maybe the max values should only be set when Garmin has decided that a certain device will not get further updates)

The use case is that it can help developers to decide which devices they support. When they decided it can help optimizing code by excluding code that is "too new" for a device. For example there's no need for the following code on system 1 devices with max api level < 2.4.0, because they can never have Properties:

function setConfig(key as Application.PropertyKeyType, val as Application.PropertyValueType) {
    if (App has :Properties) {
        App.Properties.setValue(key, val);
    } else {
        App.AppBase.setProperty(key, val);
    }
}

By knowing this we can save some precious bytes in the memory if we use:

(:system2)
function setConfig(key as Application.PropertyKeyType, val as Application.PropertyValueType) {
    App.AppBase.setProperty(key, val);
}
(:system3)
function setConfig(key as Application.PropertyKeyType, val as Application.PropertyValueType) {
    if (App has :Properties) {
        App.Properties.setValue(key, val);
    } else {
        App.AppBase.setProperty(key, val);
    }
}

Parents
  • Sorry to comment on a very old bug report, but since it was linked in a recent post:

    > But how can I know the minimum api of each device? 

    As discussed previously, you can know the minimum API of each device, from the perspective of any given build of a CIQ app. The store will refuse to install your app if it doesn't have (at a minimum) the connectIQVersion specified in compiler.json for your device and part number. Therefore, that build of your app will never see any CIQ version lower than the one in compiler.json (at the time of the build).

    For all practical purposes, this is effectively indistinguishable from knowing the minimum API level of a device. For example, if I build a new app or update an existing app for fr955 today, fr955's compiler.json specifies that the minimum CIQ version is effectively 5.0.0. It doesn't matter that it used to be 4.2.x in compiler.json, or that some fr955s in the wild may still have 4.2.x (and perhaps their owners have no intention of upgrading.) Those fr955s with CIQ < 5.0.0 basically don't exist as far as that build of your app is concerned, because that build cannot be installed on those devices (unless the devices receive the requisite firmware upgrade).

    Details:

    In the compiler.json file for any given device, each partNumber entry has a key called connectIQVersion, which is a string containing a CIQ version (such as "5.0.1"). It also has a corresponding firmwareVersion, which should be the (minimum) firmware version which supports the aforementioned CIQ version.

    When you build and export a CIQ app, for each supported part number, connectIQversion and firmwareVersion are baked into the manifest file.

    When a user tries to install that build of your app, the store will check your device to ensure it has the minimum required firmware version (and hence, the minimum required CIQ version). If it doesn't, the user will get a message stating they need to upgrade their device.

Comment
  • Sorry to comment on a very old bug report, but since it was linked in a recent post:

    > But how can I know the minimum api of each device? 

    As discussed previously, you can know the minimum API of each device, from the perspective of any given build of a CIQ app. The store will refuse to install your app if it doesn't have (at a minimum) the connectIQVersion specified in compiler.json for your device and part number. Therefore, that build of your app will never see any CIQ version lower than the one in compiler.json (at the time of the build).

    For all practical purposes, this is effectively indistinguishable from knowing the minimum API level of a device. For example, if I build a new app or update an existing app for fr955 today, fr955's compiler.json specifies that the minimum CIQ version is effectively 5.0.0. It doesn't matter that it used to be 4.2.x in compiler.json, or that some fr955s in the wild may still have 4.2.x (and perhaps their owners have no intention of upgrading.) Those fr955s with CIQ < 5.0.0 basically don't exist as far as that build of your app is concerned, because that build cannot be installed on those devices (unless the devices receive the requisite firmware upgrade).

    Details:

    In the compiler.json file for any given device, each partNumber entry has a key called connectIQVersion, which is a string containing a CIQ version (such as "5.0.1"). It also has a corresponding firmwareVersion, which should be the (minimum) firmware version which supports the aforementioned CIQ version.

    When you build and export a CIQ app, for each supported part number, connectIQversion and firmwareVersion are baked into the manifest file.

    When a user tries to install that build of your app, the store will check your device to ensure it has the minimum required firmware version (and hence, the minimum required CIQ version). If it doesn't, the user will get a message stating they need to upgrade their device.

Children
No Data