Google Connection Connection API: measure signal strength

I recently found a seemingly wonderful way to communicate between devices using the Google APIs nearby . The failure in the documentation did not answer my question - is it possible to measure the signal strength of the connection in real time or should I invent some kludges, for example. measurement time of sending and receiving data or something else?

Thanks.

+4
source share
2 answers

As a developer of the API described in the thread Next to Google Messages - Cancel the start link between devices :

,

BLE RSII

, BLE RSSI, BLE. , , , , .

API- .

+4

"API ", "API ", Wifi-Signal:

WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
int numberOfLevels = 5;
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
int level = WifiManager.calculateSignalLevel(wifiInfo.getRssi(), numberOfLevels);
+1

Source: https://habr.com/ru/post/1609026/


All Articles