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);
    }
}

  • But that list only has 1 version for each device. I thought it is the min api version, but I just realized that it's the max, because for FR245 it's 3.3.0, so it's pretty bad 'cause how can one guess what was the 1st (min) api version for a device?

  • Compatible devices shows you the API level for all devices: https://developer.garmin.com/connect-iq/compatible-devices/

    The API Guide has "Since API Level" for all calls, so you can see when something was added.

    It's VERY rare that an API call gets removed, and if that's going to happen, the API doc notes it well in advance..

    While you don't see it in the web based doc, the doc included with the SDKs  shows you the compatible devices when needed for API calls.