tupini07
tupini07

Reputation: 558

Android: Get Bluetooth RSSI value from specific BluetoothDevice

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!!

Upvotes: 1

Views: 4361

Answers (1)

Doug Koellmer
Doug Koellmer

Reputation: 437

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 call BluetoothGatt#readRemoteRssi(). This results in a callback to BluetoothGattCallback#onReadRemoteRssi().

Upvotes: 1

Related Questions