VJgh VJgh - 1 year ago 121
Android Question

Get IP and name of devices on WIFI

I'm working on a little application, the first step is to get IP and name of all devices connected to my wifi.
Actually I'm able to get only the BSSID of some devices in my wifi but not all

code is:

WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
List<ScanResult> a=wifi.getScanResults();
int j=0;


how can I get what i want?

Answer Source
WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);
String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());

called Android Network Discovery and interested developers can get its source code from github repo

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download