Obtenga RSSI de dispositivos rápidamente en Android

So I’m pondering an application that would require gathering bluetooth RSSI information for any number of surrounding android devices quickly (< 1 second per device, preferably faster) and continuously. It podría pair with the devices as long as that pairing doesn’t require any user interaction or previous interaction between the phones.

I don’t have any prior experience with bluetooth, just the reading I’ve done over the last couple of days; I’m looking for a little direction.

What are the options for this, if any? It looks like someone is doing something similar aquí with iOS and BLE. I could accept BLE as a limitation if that drastically simplifies things.

preguntado el 24 de agosto de 12 a las 19:08

1 Respuestas

You can collect the RSSI like that on Android during an inquiry:

BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
short rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI, (short) 0);

But be carefull, some devices do not support reading the RSSI.

Respondido el 22 de Septiembre de 12 a las 14:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.