What I’m doing now is trying to scan for both BLE and classic bluetooth devices at the same time. As far as I could see I can discover both by using:
BluetoothAdapter.getDefaultAdapter().startDiscovery() and receiving intents via previously registered
BroadcastReceiver. It works fine and I can distinguish between classic and LE devices but I have some valuable data in advertising packet and I have no idea how to get it from incoming
Intent. Appreciate any ideas.
I am not sure if this will allow you to get all the information you need, but it should allow you to get at least some of it.
When you receive the
Intent has an extra field identified by
BluetoothDevice.EXTRA_DEVICE. This extra contains an instance of
BluetoothDevice that represents the remote device. The
BluetoothDevice instance will allow you to get some information about the device such as its name and type.
Intent also has an extra field identified by
BluetoothDevice.EXTRA_CLASS which contains a
BluetoothClass instance that also provides some more information about the remote device such as the class of the device.