Class: $.NordicThingySensorDelegate
- Inherits:
-
Sensor.SensorDelegate
-
Sensor.SensorDelegate
-
Overview
This app uses the Bluetooth Low Energy API to pair with devices.
Instance Member Summary collapse
- _bleDelegate as $.ThingyDelegate
- _profileManager as $.ProfileManager
- _scanResult as BluetoothLowEnergy.ScanResult or Null
- _sensor as Sensor.SensorInfo or Null
Instance Method Summary collapse
-
initialize()
Constructor.
-
onPair(sensor as Sensor.SensorInfo) as Lang.Boolean
The system will call this when a device is ready to pair.
-
onScan() as Lang.Boolean
The system will call this it is this app's turn to scan for devices.
-
onUnpair(sensor as Sensor.SensorInfo) as Lang.Boolean
The system will call this when a device is ready to unpair.
-
pairingRequired() as Lang.Boolean
The system will call this from the native pairing flow to determine if this app can pair natively.
-
procConnection(device as BluetoothLowEnergy.Device) as Void
Callback for when a connection is established.
-
procScanResult(scanResult as BluetoothLowEnergy.ScanResult) as Void
Callback for when a scan result is received.
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
onScan() as Lang.Boolean
The system will call this it is this app's turn to scan for devices.
onUnpair(sensor as Sensor.SensorInfo) as Lang.Boolean
The system will call this when a device is ready to unpair
pairingRequired() as Lang.Boolean
The system will call this from the native pairing flow to determine if this app can pair natively.
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().
procScanResult(scanResult as BluetoothLowEnergy.ScanResult) as Void
Callback for when a scan result is received