Class: $.NordicThingySensorDelegate

Inherits:
Sensor.SensorDelegate show all

Overview

This app uses the Bluetooth Low Energy API to pair with devices.

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _bleDelegate as $.ThingyDelegate

var _profileManager as $.ProfileManager

var _scanResult as BluetoothLowEnergy.ScanResult or Null

var _sensor as Sensor.SensorInfo or Null

Instance Method Details

initialize()

Constructor

onPair(sensor as Sensor.SensorInfo) as Lang.Boolean

The system will call this when a device is ready to pair

Parameters:

  • sensor —

    The sensor to pair

Returns:

  • true if pairing was started, false otherwise

onScan() as Lang.Boolean

The system will call this it is this app's turn to scan for devices.

Returns:

  • true if the app is scanning, false otherwise

onUnpair(sensor as Sensor.SensorInfo) as Lang.Boolean

The system will call this when a device is ready to unpair

Parameters:

  • sensor —

    The sensor to unpair

Returns:

  • true if unpairing was successful, false otherwise

pairingRequired() as Lang.Boolean

The system will call this from the native pairing flow to determine if this app can pair natively.

Returns:

  • true if pairing is required, false otherwise

procConnection(device as BluetoothLowEnergy.Device) as Void

Callback for when a connection is established. This will be called after a successful pairing for the same sensor passed to onPair().

Parameters:

  • device —

    The device that was connected

procScanResult(scanResult as BluetoothLowEnergy.ScanResult) as Void

Callback for when a scan result is received

Parameters:

  • scanResult —

    The scan result


Generated Jun 9, 2026, 8:45:51 AM