How can I obtain the specific information of the connected device when the Android mobile phone is used as a hotspot ?, Android details

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.