I've looked at various answers, but not found the definitive one.
My question is, on an android device with wifi, is the wifi MAC address always available whether wifi is enabled or not? (I know the bluetooth MAC address isn't).
I've found answers which say it definitively is and definitely isn't.
I know for shore that your MAC address will never be available an any WAN and LAN connections.
Have grate time of day.
Related
I need to get my own device's MAC address which I thought should be really simple but after some research it seems likely impossible.
Any one had any experience on this before? I need to get the BLE MAC on both OS.
You cannot get your own MAC address on iOS. It has never been possible to get the Bluetooth MAC. In the past developers used the WiFi MAC address as a unique device identifier. Apple has now ensured that MAC addresses are inaccessible as a privacy protection.
Can I uniquely identify each android device using its Bluetooth LE Mac address?
Does this MAC address changes on reboot?
How can I get my own device's Bluetooth LE MAC address?
Any suggestion on this will be great help for me.
Thanks!
This Stack Overflow answer answers your questions pretty well.
I haven't tried this myself but it looks like you can access the MAC address with BluetoothDevice.getAddress() (Android API reference here).
In case you are working with iOS too, you cannot access a BLE device's MAC address; see this post on Apple's Developer forum.
If you control the firmware of the device you are connecting to, you could name each device uniquely or put a unique identifier in the advertisement/scan response data. If you don't control the firmware of the device you are connecting to, it's possible that the manufacturer has done something like this.
Hope this helps!
I know this question has been asked several times but there isn't a proper code snippet or answer in SO.
I am developing an android app which gives the list of MAC addresses (IP address or device name anything ,etc. ) of all the Devices connected to a wifi network (the network in which the mobile containing this app is installed).
Is there any API's in android to achieve this or else how can we do this.
Note : Please provide the answer with a code snippet
I think that it is not possible to get Mac Address of other devices. However you can get IP addresses.
Programmatically, I got Mac addresses of other Wifi enabled devices from my device on the same network. Same I need to apply here. Is there any apps or any other possibilities to get an IP addresses of each wifi enabled devices on the network by using those Mac addresses on Android?
If you're looking for an android app, you could try Network Discovery which work very well and can list all the devices on your local network with the corresponding IP and address.
If you're looking for code instead, well the application is available on github and does (amongst other things ) basically the same thing than explained by Yahel : it reads /proc/net/arp .
Note : I'm NOT the author of this application.
This person does the exact opposite so it should work for you.
The trick is to read the ARP cache table from the device.
http://www.flattermann.net/2011/02/android-howto-find-the-hardware-mac-address-of-a-remote-host/
I was wondering if Android phones have a MAC address when connected to the internet over 3G? I'm assuming they do, so I guess my real question is whether or not there is anyway of accessing it? I haven't found anything from looking through the APIs or by googling, but maybe I missed something.
Thanks in advance
MAC address is specific to network technologies that implement the IEEE 802 standard, such as ethernet. 3G is not an IEEE 802 network, so MAC address really doesnt apply.
That said, there should be very few reasons to use the MAC address in your app, unless youre writing a network driver or doing something specific with the TCP/IP network.
Often people reach for MAC address thinking that it represents a unique device id, when really you should use something like http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID to get a unique id that will work across all of the different hardware combinations for android, some of which might include no IEE 802 network whatsoever.
I have never seen any reference to a 3G MAC address anywhere. The closest thing to a 3G MAC address that I know of is the IMEI/MEID code.
android.telephony.TelephonyManager.getDeviceId() will return the IMEI/MEID code.
If you are trying to uniquely identify app installs then see: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html