This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Android Bluetooth Smart properties

Hi,

Is there any documentation where I can see the exact meaning of the following properties related to Bluetooth Smart support on Android?

-Native HID supported

-Lollipop scanner API supported

-Offloaded filtering supported

-Offloaded scan batching supported

-Peripheral mode supported

-Multiple advertisement supported

Thank you very much!

  • Hi, let me answer your questions here.

    If you had some experience with Bluetooth LE on Android you'd have to stumble upon at least some of the topics. These properties may be useful for other Android developers to check the capabilities of their phones and tablets.

    1. Native HID supported - This has been introduced in Android 4.4 KitKat and works stable in 4.4.4 update. Before there were some bugs preventing it from working with devices that have more than 2 Report characteristics, as far as I remember. This property is set to YES if the device has Bluetooth LE and Android version is >= 4.4.

    2. Lollipop scanner API supported - In Android 5.0 (Lollipop) Google has deprecated the first API for scanning BLE devices that was there since 4.3. Instead of calling startLeScan(..) now you obtain the BluetoothLeScanner object and use its API. You may read more here: developer.android.com/.../BluetoothAdapter.html The method getBluetoothLeScanner() returns null if Bluetooth adapter is disabled, that's why you sometimes may get UNKNOWN there. This property is set to YES if the device runs Android Lollipop and this method does not return null.

    3. On some devices running Lollipop or newer versions hardware advertising filtering is supported. It requires special features on the chip. This property is set to YES if isOffloadedFilteringSupported() method returns true (developer.android.com/.../BluetoothAdapter.html

    4. Pretty much same situation as with 3. Some devices (all recent I guess) support hardware batching of adv packets. Instead of reporting whenever an advertisement was received they report every ReportDelay. You set the delay in ScanSettings->setReportDelay(milliseconds). When using offloaded batching be aware that some devices (Samsung S6 and S6 Edge) have a bug and all packets reported with this mode have exactly the same RSSI value. You may enable scanning with this option in nRF MCP settings (Scanner). This property is set to YES if isOffloadedScanBatchingSupported() method returns true.

    5. Peripheral mode means that the Android device may advertise itself, not only connect to another device. This requires special feature in Bluetooth chip and Android Lollipop (5.0+). Not all updated devices support it, e.g. Nexus 4 or 5 don't, but Nexus 6 and 9 do. Also other recent phones support it. To start advertising the BluetoothLeAdvertiser object it required. You get it by calling getBluetoothLeAdvertiser() method. It may return null if the adapter is turned off. This property is set to YES if this method does not return null and the device runs Lollipop or newer system.

    6. This is also pretty much like 3. There is a method in BluetoothAdapter called isMultipleAdvertisementSupported(). This property is set to YES if this method returns true and device runs Android Lollipop or newer system.

    I hope you understand them now.

    Best Regards, Aleksander

Related