Class: Toybox.Sensor.SensorDelegate

Overview

Delegate for handling native sensor pairing process.

The members of this object get called by the system to delegate scanning and pairing of different sensors.

Since:

API Level 5.1.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

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

Pair the sensor.

Is called by the system to pair the sensor, during the native sensor pairing process.

Parameters:

Returns:

  • Lang.Boolean

    true if the sensor was paired successfully, false otherwise

Since:

API Level 5.1.0

onScan() as Lang.Boolean

Start the sensor scan process.

Is called by the system to start the sensor scan process, during the native sensor pairing process.

Returns:

  • Lang.Boolean

    true if the scan was started successfully, false otherwise

Since:

API Level 5.1.0

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

Unpair the sensor.

Is called by the system to unpair the sensor, during the native sensor removing process.

Parameters:

Returns:

  • Lang.Boolean

    true if the sensor was paired successfully, false otherwise

Since:

API Level 5.1.0

pairingRequired() as Lang.Boolean

Is sensor pairing required?

Is called by the system to check if sensor pairing is required.

Returns:

  • Lang.Boolean

    true if sensor pairing is required, false otherwise

Since:

API Level 5.1.0


Generated Mar 4, 2025, 4:09:53 PM