How to use sensor.delegate class? Where can i find examples?

Garmin's System8 announcement includes:

"Sensor Pairing

If your device application or data field communicates wirelessly with a sensor or peripheral using ANT, ANT plus, or Bluetooth Low Energy (BLE), then you will need to implement a pairing process. Connect IQ allows you to implement a Sensors.SensorDelegate that allows you to have your device pair as part of the device’s sensor paring UI flow. See the Sensors.SensorDelegate class in the API docs for details."

Is there any further information on this? The API docs are short... - i would like to see an example how to program a sensor delegate.

  • Hmm, before i invest time to dive into this new sensor.delegate rabbit hole: what could be the advantage, compared to my datafield which does scanning and pairing without using sensor.delegate class? (as does the old nordicthingy52 example)

    i think the intent of this feature is to provide an improved user experience for pairing sensors with CIQ apps.

    e.g. If you have a data field which pairs with a sensor:

    - the old way is that they have to read the store page / manual which tells them to "somehow" find the ANT+ ID of the sensor and type it into the settings, and/or the data field just pairs with the first sensor it finds of the correct type

    - the new way is that when they install the data field, the native UI tells them that sensor pairing is necessary, and the user gets to use the native sensor pairing UI to find and pair their sensor

    I'm also going to guess that this might be part of complying with the new EU rules about notifying the user of insecure wireless connections (in this case I mean short-range wireless like bluetooth, ant, etc.) Notice how every part of the native UI which deals with sensors now has information about whether wireless connections are secure, including the native sensor menu and the HR broadcasting feature.

    Could be Garmin really wants CIQ app devs to use the native pairing UI so CIQ users see the same wireless security information.