SensorProvider¶
-
public interface
SensorProvider
¶ Interface to provide
KallistoSensors
to the system.A developer can provide their own sensors to the system implementing this interface and passing it using
KallistoSensorManager.getInstance(Context,BleDeviceManagerConfiguration,LoggerConfiguration,ScannerConfiguration,ScannerFilter,List)
.
Methods¶
provide¶
-
List<KallistoSensor>
provide
(Kallisto kallisto, ScanRecord scanRecord, BleDispatcher bleDispatcher, EventListener dispatcher)¶ Should provide a list of sensors, if they are present in the
Kallisto
device.The parameter
ScanRecord
should be used to check if aKallisto
device contains a given sensor so a custom device should advertise whichsensors
are available.If
ScannerConfiguration.getLegacyDiscovery()
is disabled, all BLE operations requested to thebleDispatcher
will fail and the callsBleDispatcher.getServices()
andBleDispatcher.getCharacteristics(UUID)
will report empty data.If
ScannerConfiguration.getLegacyDiscovery()
is enabled, BLE operations can used to identify the availablesensors
by using their UUID, for example.- Parameters
kallisto – The
Kallisto
device under discovery.scanRecord – The advertising data of the device. Can be
null
if no scan record is available.bleDispatcher – Interface to perform BLE operations. Should be saved to allow interaction with the remote device.
dispatcher – Interface to send
de.sensry.kallisto.hardware.listeners.events.SensorEvent
andde.sensry.kallisto.hardware.listeners.events.CalibrationEvent
.
- Returns