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 a Kallisto device contains a given sensor so a custom device should advertise which sensors are available.

If ScannerConfiguration.getLegacyDiscovery() is disabled, all BLE operations requested to the bleDispatcher will fail and the calls BleDispatcher.getServices() and BleDispatcher.getCharacteristics(UUID) will report empty data.

If ScannerConfiguration.getLegacyDiscovery() is enabled, BLE operations can used to identify the available sensors by using their UUID, for example.

Parameters
Returns

A list of sensors available in the Kallisto device