Reputation: 684
I'm working on an Android app which is required to detect the number of smarthphones close to the device the app is running on. For this purpose, I have a working implementation of scheduled Bluetooth BLE scans. I'm detecting BLE devices in the vicinity without issues, but can't seem to find any smartphones in the scan results.
My question is: Can we detect other smartphones using a BLE scan on Android? (Specifically; if we have no control over settings in the other smartphones).
I have tried scanning for BLE devices with the following bluetooth libraries:
To try and detect a smartphone I have tried the following:
Tested with devices:
Other: Bluetooth, bluetooth_admin and access_fine_location (runtime-) permissions are all taken care of.
I can not seem to detect the expected mac address of the devices I have tested with, nor any device which has a 'phone-type' device class. The only device class I run into occasionally is 7936 (1F00), also know as 'uncategorized'. Otherwise it is 0. Any suggestions or information regarding this issue is welcome.
Upvotes: 0
Views: 2910
Reputation: 38
With BLE and Classic Bluetooth, Android will discover nearby unpaired bluetooth devices that are currently "discoverable". The trouble is even when the nearby devices have bluetooth enabled, they are not actually "discoverable" until they are on their Bluetooth Setting page.
So in your case, it seems unlikely that you can detect unpaired devices near the device.
Upvotes: 1