Class 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 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 class Sensor
      • stopUpdates

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

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