Class 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 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: Sensor
        Starts receiving sensor data values
        Specified by:
        startUpdates in class Sensor
      • stopUpdates

        public void stopUpdates()
        Description copied from class: Sensor
        Stops receiving sensor data values
        Specified by:
        stopUpdates in class Sensor
      • startDiscovery

        public void startDiscovery()
        Starts discovering bluetooth devices
      • isBluetoothEnabled

        public boolean isBluetoothEnabled()
        Checks if Bluetooth LE enabled
        Returns:
        boolean