Class BluetoothLESensor
- java.lang.Object
-
- eu.h2020.helios_social.core.sensor.Sensor
-
- eu.h2020.helios_social.core.sensor.ext.BluetoothLESensor
-
public class BluetoothLESensor extends Sensor
This class provides an implementation of sensor API for scanning bluetooth LE devices. BluetoothLESensor is a subclass of the abstract base class Sensor. It uses Android BluetoothAdapter API.
-
-
Constructor Summary
Constructors Constructor Description BluetoothLESensor(android.content.ContextWrapper appEnv)Creates a BluetoothLESensorBluetoothLESensor(java.lang.String id, android.content.ContextWrapper appEnv, java.util.List<android.bluetooth.le.ScanFilter> filters, android.bluetooth.le.ScanSettings settings)Creates a BluetoothLESensor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBluetoothEnabled()Checks if Bluetooth LE enabledvoidstartUpdates()Starts receiving sensor data valuesvoidstopUpdates()Stops receiving sensor data values-
Methods inherited from class eu.h2020.helios_social.core.sensor.Sensor
finalize, getId, getSensorById, getValueListeners, receiveValue, registerValueListener, unregisterValueListener
-
-
-
-
Constructor Detail
-
BluetoothLESensor
public BluetoothLESensor(android.content.ContextWrapper appEnv)
Creates a BluetoothLESensor- Parameters:
appEnv- the application env
-
BluetoothLESensor
public BluetoothLESensor(java.lang.String id, android.content.ContextWrapper appEnv, java.util.List<android.bluetooth.le.ScanFilter> filters, android.bluetooth.le.ScanSettings settings)Creates a BluetoothLESensor- Parameters:
appEnv-filters-settings-
-
-
Method Detail
-
startUpdates
public void startUpdates()
Description copied from class:SensorStarts receiving sensor data values- Specified by:
startUpdatesin classSensor
-
stopUpdates
public void stopUpdates()
Description copied from class:SensorStops receiving sensor data values- Specified by:
stopUpdatesin classSensor
-
isBluetoothEnabled
public boolean isBluetoothEnabled()
Checks if Bluetooth LE enabled- Returns:
- boolean
-
-