How can I obtain the specific information of the connected device when the Android mobile phone is used as a hotspot ?, Android details
1. The connected device information is stored in/data/misc/dhcp/dnsmasq. leases.
2. Its format is:
/System id, no value required/client mac address/client IP Address/client device name/weighted mac address or value required
<span style="font-size:14px;">1357041758 88:00:12:34:56:78 192.168.43.133 android-184cc6c105d7a3b 01:88:00:12:34:56:78</span>
2. Refer to the getClientIp () method of WifiServie. java to customize this method to get the device name, as shown below:
<Span style = "font-size: 14px;"> public String getClientDeviceName (String deviceAddress) {// transmit the mac address to enforceAccessPermission (); if (TextUtils. isEmpty (deviceAddress) {return null;} // read the corresponding file information for (String s: readClientList ("/data/misc/dhcp/dnsmasq. leases ") {if (s. indexOf (deviceAddress )! =-1) {String [] fields = s. split (""); // check whether the data is damaged if (fields. length> 4) {// return the 4th field return fields [3] ;}} return null ;}</span>
Reprinted please indicate the source: Zhou mu Shui CSDN blog http://blog.csdn.net/zhoumushui
My GitHub: Zhou mu Shui's GitHub https://github.com/zhoumushui
How can I view the information of the connected device after setting up a hotspot on an Android phone?
No, but you can set a password! There is a special battery.
How do I know if other devices are connected to the hotspot after android phones are used as the hotspot? Which of the following heroes knows how to help,
Which can be viewed in the connected device.