icon_android Android

The Bluetooth sensor logs the mobile device’s Bluetooth sensor and detects surrounding Bluetooth-enabled and visible devices with respective RSSI dB values at specified intervals (default is 60 seconds). A scan session assigns the same timestamp for all the found Bluetooth devices. Android can take up to 60 seconds to resolve all the found Bluetooth device’s names. There is no way around this. The default and recommended scanning interval is 60 seconds or higher.

Settings

  • Bluetooth.STATUS_BLUETOOTH: true or false to activate or deactivate Bluetooth sensor.
  • Bluetooth.FREQUENCY_BLUETOOTH: Frequency of Bluetooth scans, in seconds (default = 60).

aware-broadcasts

  • Bluetooth.ACTION_AWARE_BLUETOOTH_NEW_DEVICE: broadcasted when a new Bluetooth device is detected.
    • Bluetooth.EXTRA_DEVICE: ContentValues parseable extra with the device’s information.
  • Bluetooth.ACTION_AWARE_BLUETOOTH_SCAN_STARTED: broadcasted when a scan session has started.
  • Bluetooth.ACTION_AWARE_BLUETOOTH_SCAN_ENDED: broadcasted when a scan session has ended.
  • Bluetooth.ACTION_AWARE_BLUETOOTH_REQUEST_SCAN: received broadcast to request a Bluetooth scan as soon as possible, as Bluetooth scanning is monopolist.

aware-providers

Bluetooth Sensor

Contains the mobile device’s Bluetooth sensor information.

Bluetooth_Sensor.CONTENT_URI
content://com.aware.provider.bluetooth/sensor_bluetooth

Table field Field type Description
_id INTEGER primary key, auto incremented
timestamp REAL unixtime milliseconds since 1970
device_id TEXT AWARE device UUID
bt_address TEXT the device’s Bluetooth sensor MAC address
bt_name TEXT the device’s Bluetooth sensor user assigned name

Bluetooth Data

Contains the scan results data.

Bluetooth_Data.CONTENT_URI
content://com.aware.provider.bluetooth/bluetooth

Table field Field type Description
_id INTEGER primary key, auto incremented
timestamp REAL unixtime milliseconds since 1970
device_id TEXT AWARE device UUID
bt_address TEXT the device’s Bluetooth sensor MAC address
bt_name TEXT the device’s Bluetooth sensor user assigned name
bt_rssi INTEGER the RSSI dB to the scanned device
label TEXT a customisable label for naming a device

 


icon_ios iOS

The Bluetooth sensor detects surrounding Bluetooth-enabled and visible devices at specified intervals (default is 60 seconds). GitHub version of AWARE iOS can detect Classic Bluetooth and Bluetooth Low Energy (BLE) devices by using private API. However, AppStore version detects only BLE devices (e.g., heart rate sensor on wearable devices, and beacon device for indoor positioning, environmental sensors.)

Apple rejects all apps which are using private APIs in a reviewing process. Therefore, AppStore version does not support Classis Bluetooth. Also, as well, GitHub version will be not supportable, because Apple hid the all private APIs after Xcode 7.x.

By scanning the advertise packets from BLE devices, the app (AppStore version) detects surrounding BLE devices. By default, the app scans only UUIDs that identify a service or characteristic are predefined by the Bluetooth Special Interest Group (SIG), Bluetooth SIG. If you need to scan your specific BLE devices and services, you have to register the UUIDs to the app. Please check more detail information from Core Bluetooth Programming Guide.

NOTE: UUIDs on BLE are not unique to each device.

aware-broadcasts

  • ACTION_AWARE_BLUETOOTH_NEW_DEVICE: broadcasted when a new Bluetooth device is detected. (only GitHub version)
    • EXTRA_DEVICE: ContentValues parseable extra with the device’s information.
  • ACTION_AWARE_BLUETOOTH_SCAN_STARTED: broadcasted when a scan session has started. (only GitHub version)
  • ACTION_AWARE_BLUETOOTH_SCAN_ENDED: broadcasted when a scan session has ended. (only GitHub version)
  • ACTION_AWARE_BLUETOOTH_REQUEST_SCAN: received broadcast to request a Bluetooth scan as soon as possible, as Bluetooth scanning is monopolist. (only GitHub version)

aware-providers

Bluetooth Data

Contains the scan results data.

Table field Field type Description
_id INTEGER primary key, auto incremented
timestamp REAL unixtime milliseconds since 1970
device_id TEXT AWARE device UUID
bt_address TEXT scaned Generic Attributes (GATT) Characteristic (hhttps://www.bluetooth.com/specifications/gatt)
bt_name TEXT user-assigned name of the scanned BLE device (with serial number of the device)
bt_rssi INTEGER not supported on iOS
label TEXT a customisable label for naming a device
Bluetooth