C cwt Active Member Licensed User Longtime User Feb 21, 2012 #1 I am creating an in house app to communicate with a soap server. In the app setup the user saves his username and password which is sent to the server for verification when he posts soap packets. I want further validation of the user and thought maybe sending the device phone number to be used for validation on the server but then tablets don't have phone number and I want the app to be used on both phones and tablets. So I figure every device will have a MAC address. How do I get the MAC address of the Android device? I did a search and did not find an answer. Of course, the MAC address will need to be saved in the users profile on the server so it can be compared to the device MAC address. Thanks
I am creating an in house app to communicate with a soap server. In the app setup the user saves his username and password which is sent to the server for verification when he posts soap packets. I want further validation of the user and thought maybe sending the device phone number to be used for validation on the server but then tablets don't have phone number and I want the app to be used on both phones and tablets. So I figure every device will have a MAC address. How do I get the MAC address of the Android device? I did a search and did not find an answer. Of course, the MAC address will need to be saved in the users profile on the server so it can be compared to the device MAC address. Thanks
NJDude Expert Licensed User Longtime User Feb 21, 2012 #2 You could use the Android ID (needs a reference to the Phone library) Code: Copy Dim p As Phone MsgBox("The device's ID is: " & p.GetSettings("android_id"), "") Upvote 0
You could use the Android ID (needs a reference to the Phone library) Code: Copy Dim p As Phone MsgBox("The device's ID is: " & p.GetSettings("android_id"), "")
C cwt Active Member Licensed User Longtime User Feb 21, 2012 #3 yes - you are right - the phone, or maybe even the tablet, may not have wi-fi and would not have a mac address. But does a tablet have an Android ID? I need a unique device identifier whether the device is a phone or a tablet. Thanks Upvote 0
yes - you are right - the phone, or maybe even the tablet, may not have wi-fi and would not have a mac address. But does a tablet have an Android ID? I need a unique device identifier whether the device is a phone or a tablet. Thanks
NJDude Expert Licensed User Longtime User Feb 21, 2012 #4 That ID is unique to all devices and all devices have it. Upvote 0
S salmander Active Member Licensed User Longtime User Mar 19, 2012 #6 NJDude said: That ID is unique to all devices and all devices have it. Click to expand... it is giving me the following error when I try to compile Code: Copy Compiling code. Error Error compiling program. Error description: Unknown member: getsettings I am using Phone v1.75 lib. Upvote 0
NJDude said: That ID is unique to all devices and all devices have it. Click to expand... it is giving me the following error when I try to compile Code: Copy Compiling code. Error Error compiling program. Error description: Unknown member: getsettings I am using Phone v1.75 lib.
S salmander Active Member Licensed User Longtime User Mar 19, 2012 #7 salmander said: it is giving me the following error when I try to compile Code: Copy Compiling code. Error Error compiling program. Error description: Unknown member: getsettings I am using Phone v1.75 lib. Click to expand... Sorry my bad, its solved. i was using p as phoneId. And not Phone. I changed it to phone...and its working... Thanks. Upvote 0
salmander said: it is giving me the following error when I try to compile Code: Copy Compiling code. Error Error compiling program. Error description: Unknown member: getsettings I am using Phone v1.75 lib. Click to expand... Sorry my bad, its solved. i was using p as phoneId. And not Phone. I changed it to phone...and its working... Thanks.
J jiangws Member Licensed User Longtime User Feb 6, 2013 #8 You can use ABWifi library. ABWifi library can get mac address. Upvote 0
M madSac Active Member Licensed User Longtime User Feb 6, 2013 #9 NJDude said: That ID is unique to all devices and all devices have it. Click to expand... I don't think. Once while rooting my phone i bricked it :sign0137: .I downloaded original version by the device vendor then then unbricked it using Odin. When i checked old android id in a file i made and current android id both were different and changed.There are millions of android devices may be this new id will match any. Since then i tried 2-3 times all times android id's were different.So i think that it is not unique for all devices it doesn't depends upon hardware. And probably MAC address's are also changed and even they can be changed using superuser permission. Upvote 0
NJDude said: That ID is unique to all devices and all devices have it. Click to expand... I don't think. Once while rooting my phone i bricked it :sign0137: .I downloaded original version by the device vendor then then unbricked it using Odin. When i checked old android id in a file i made and current android id both were different and changed.There are millions of android devices may be this new id will match any. Since then i tried 2-3 times all times android id's were different.So i think that it is not unique for all devices it doesn't depends upon hardware. And probably MAC address's are also changed and even they can be changed using superuser permission.
imgsimonebiliato Well-Known Member Licensed User Longtime User May 30, 2013 #10 NJDude said: You could use the Android ID (needs a reference to the Phone library) Code: Copy Dim p As Phone MsgBox("The device's ID is: " & p.GetSettings("android_id"), "") Click to expand... Hi NJDude, the p.GetSettings("android_id") method, don't return me the MAC address. How can I get it? Upvote 0
NJDude said: You could use the Android ID (needs a reference to the Phone library) Code: Copy Dim p As Phone MsgBox("The device's ID is: " & p.GetSettings("android_id"), "") Click to expand... Hi NJDude, the p.GetSettings("android_id") method, don't return me the MAC address. How can I get it?
M madSac Active Member Licensed User Longtime User Jun 9, 2013 #11 imgsimonebiliato said: Hi NJDude, the p.GetSettings("android_id") method, don't return me the MAC address. How can I get it? Click to expand... There are more two mac address in a device, one of bluetooth & another of wifi. For bluetooth MAC Basic4android - Serial For wifi MAC Basic4android - ABWifi Note that there is no mac address of a mobile/pc..mac address are of network adapters like wifi,bluetooth,NIC etc Upvote 0
imgsimonebiliato said: Hi NJDude, the p.GetSettings("android_id") method, don't return me the MAC address. How can I get it? Click to expand... There are more two mac address in a device, one of bluetooth & another of wifi. For bluetooth MAC Basic4android - Serial For wifi MAC Basic4android - ABWifi Note that there is no mac address of a mobile/pc..mac address are of network adapters like wifi,bluetooth,NIC etc