I'm making an Android application in which I need to be able to know the RSSI value of a specific device continuously. I have no problem getting the RSSI while scanning for devices however this is too slow for what I need.
I was thinking it might be possible to get the RSSI of a specific instance of a BluetoothDevice but I really have no idea where to start, so I'm asking here.
Is this possible? And if it is, do you know how to do it?
Or if you know another way to get the proximity value from another specific devices then please tell me! :)
Thanks!!
If your use case allows you to connect to a device then it should be possible to get RSSI at a higher frequency than scanning. Once you connect to a device and get a
BluetoothGatt
object you can callBluetoothGatt#readRemoteRssi()
. This results in a callback toBluetoothGattCallback#onReadRemoteRssi()
.