Suppose say an android phones hotspot is switched on,can an application running on the phone get access to the MAC addresses of the different devices that are trying to connect to it?
Asked
Active
Viewed 1,699 times
1
-
1Looks like you could use a good google search? Marking your question as duplicate of this one: http://stackoverflow.com/questions/16998095/list-connected-devices-to-android-phone-working-as-wifi-access-point – Razgriz Apr 22 '16 at 05:18
-
this is about connected devices,I need all the devices whose wifi is switched on and are pinging their MAC addresses – Vinay George Roy Apr 26 '16 at 10:17
1 Answers
0
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo wInfo = wifiManager.getConnectionInfo();
String macAddress = wInfo.getMacAddress();
Also, add below permission in your manifest file
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
reference on stack overflow answer

Community
- 1
- 1

Muhammad Waleed
- 2,517
- 4
- 27
- 75
-
This gives the MAC id of our device, i need the mac ids of those devices which are within the hotspot region and who are pinging their MAC ids – Vinay George Roy Apr 26 '16 at 10:18