Class BluetoothSensor
- java.lang.Object
-
- eu.h2020.helios_social.core.sensor.Sensor
-
- eu.h2020.helios_social.core.sensor.ext.BluetoothSensor
-
public class BluetoothSensor extends Sensor
This class provides an implementation of sensor API for discovering bluetooth devices. BluetoothSensor is a subclass of the abstract base class Sensor. It uses Android BluetoothAdapter API.
-
-
Constructor Summary
Constructors Constructor Description BluetoothSensor(android.content.ContextWrapper appEnv)Creates a BluetoothSensorBluetoothSensor(java.lang.String id, android.content.ContextWrapper appEnv)Creates a BluetoothSensor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBluetoothEnabled()Checks if Bluetooth LE enabledvoidstartDiscovery()Starts discovering bluetooth devicesvoidstartUpdates()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
-
BluetoothSensor
public BluetoothSensor(java.lang.String id, android.content.ContextWrapper appEnv)Creates a BluetoothSensor- Parameters:
appEnv- the application env
-
BluetoothSensor
public BluetoothSensor(android.content.ContextWrapper appEnv)
Creates a BluetoothSensor- Parameters:
appEnv- the application env
-
-
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
-
startDiscovery
public void startDiscovery()
Starts discovering bluetooth devices
-
isBluetoothEnabled
public boolean isBluetoothEnabled()
Checks if Bluetooth LE enabled- Returns:
- boolean
-
-