1
votes

I am making an application in which I will create a wifi hotspot using my android device. A hardware will be connected to this hotspot. Now I want to know the RSSI value of this wifi connection on my android device as this value will be used for creating notifications in my android phone. Please note that I need to create a hotspot using my android phone.

1
Please post your code it will be useful to recognize your question - Willie Cheng
` WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiInfo info = wifiManager.getConnectionInfo(); String ssid = info.getSSID(); int rssi = info.getRssi(); ` . I have used this but it only works when my android device is connected to an access point. But I want to my android device to act as a access point by creating wifi hotspot and then to read th RSSI value of the connections made to this AP - Himanshu Kushwaha

1 Answers

1
votes

You get the SSID you are connected to and its RSSI like this:

WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifiManager.getConnectionInfo();
String ssid = info.getSSID();
int rssi = info.getRssi();