Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7760725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:57:54+00:00 2026-06-01T13:57:54+00:00

I got the program for Wifi tethering which i got a open (non secured)

  • 0

I got the program for Wifi tethering which i got a open (non secured) hot spot in Android. I like to view the details of client (SSID and IP address) connected to my hotspot.
I used SocketAddress socketid=socket.getLocalSocketAddress(); and also used

public  void getLocalIpAddressString() {
   try {
       for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
          NetworkInterface intf = en.nextElement();
          for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
                InetAddress inetAddress = enumIpAddr.nextElement();
               if (!inetAddress.isLoopbackAddress()) {
                   // return inetAddress.getHostAddress().toString();
                    Toast.makeText(getApplicationContext(), inetAddress.getHostAddress().toString(),
                            Toast.LENGTH_SHORT).show();

                }
           }
        }
    } catch (Exception ex) {
      Log.e("IPADDRESS", ex.toString());
   }
  // return null;
   }

These will return only the local IP but can you please help me in getting the IP address of client connected to my Wifi Hotspot. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:57:56+00:00Added an answer on June 1, 2026 at 1:57 pm

    Finally I got the response for getting the Client IP connected to my hotspot. The code below will track the Mac and IP changes each time a new client is added to my network

    public void getClientList() {
    
        int macCount = 0;
        BufferedReader br = null;
        try {
            br = new BufferedReader(new FileReader("/proc/net/arp"));
            String line;
            while ((line = br.readLine()) != null) {
                String[] splitted = line.split(" +");
    
                if (splitted != null && splitted.length >= 4) {
                    // Basic sanity check
                    String mac = splitted[3];
    
                    if (mac.matches("..:..:..:..:..:..")) {
                        macCount++;
                        ClientList.add("Client(" + macCount + ")");
                        IpAddr.add(splitted[0]);
                        HWAddr.add(splitted[3]);
                        Device.add(splitted[5]);
                        Toast.makeText(
                                getApplicationContext(),
                                "Mac_Count  " + macCount + "   MAC_ADDRESS  "
                                        + mac, Toast.LENGTH_SHORT).show();
                        for (int i = 0; i < splitted.length; i++)
                            System.out.println("Addressssssss     "
                                    + splitted[i]);
                    }
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to writing app for android. I've got program writing experience in non
I've got a program which uses app.config for storing some preferences. The problem is
Hello I've currently got a program which retrieves WMI information and stores it to
I came up with a small problem. Now, I've got a program which plots
I've got a program that can open TIFF documents and display them. I'm using
I've got a program which I'm maintaining, which was written by the guy I
I've got a program which we are going to use to generate rough translations
I've got a program which contains 2 div's. Depending on the user at any
I've got one program which creates 3 worker programs. The preferable method of communication
I've got a program I would like to use to input a password and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.