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 boolean
isBluetoothEnabled()
Checks if Bluetooth LE enabledvoid
startUpdates()
Starts receiving sensor data valuesvoid
stopUpdates()
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:Sensor
Starts receiving sensor data values- Specified by:
startUpdates
in classSensor
-
stopUpdates
public void stopUpdates()
Description copied from class:Sensor
Stops receiving sensor data values- Specified by:
stopUpdates
in classSensor
-
isBluetoothEnabled
public boolean isBluetoothEnabled()
Checks if Bluetooth LE enabled- Returns:
- boolean
-
-