D DickD Active Member Licensed User Feb 28, 2017 #1 I am trying to get the MacAddress of my phone using serial1.Address. I've tried placing this before and after serial1.Initialize("serial1") and/or before and after serial1.Connect(...). This works just fine on an Android 4.4 phone but on Android 6 it returns the address 02:00:00:00:00:00. How do I get the MacAddress of an And. 6 phone?
I am trying to get the MacAddress of my phone using serial1.Address. I've tried placing this before and after serial1.Initialize("serial1") and/or before and after serial1.Connect(...). This works just fine on an Android 4.4 phone but on Android 6 it returns the address 02:00:00:00:00:00. How do I get the MacAddress of an And. 6 phone?
DonManfred Expert Licensed User Longtime User Mar 1, 2017 #2 Android 6 does not provide the Mac anymore. Search Androids developer site or the forum. this has been asked a few times. Upvote 0
Android 6 does not provide the Mac anymore. Search Androids developer site or the forum. this has been asked a few times.
D DickD Active Member Licensed User Mar 1, 2017 #3 DonManfred said: Android 6 does not provide the Mac anymore. Search Androids developer site or the forum. this has been asked a few times. Click to expand... I found Erel's code below in another thread to get the MacAddress but I can't get it to work. I get the following error message: java.lang.RuntimeException: Method: getWifiMacAddress not found in: b4a.example.chatactivity Code: Copy Sub Activity_Create(FirstTime As Boolean) Dim jo As JavaObject = Me Log(jo.RunMethod("getWifiMacAddress", Null)) Upvote 0
DonManfred said: Android 6 does not provide the Mac anymore. Search Androids developer site or the forum. this has been asked a few times. Click to expand... I found Erel's code below in another thread to get the MacAddress but I can't get it to work. I get the following error message: java.lang.RuntimeException: Method: getWifiMacAddress not found in: b4a.example.chatactivity Code: Copy Sub Activity_Create(FirstTime As Boolean) Dim jo As JavaObject = Me Log(jo.RunMethod("getWifiMacAddress", Null))
D DickD Active Member Licensed User Mar 1, 2017 #4 DonManfred said: Android 6 does not provide the Mac anymore. Search Androids developer site or the forum. this has been asked a few times. Click to expand... I guess I also have to incorporate the Java code from Erel's example into my Activity but I don't know how to do that. Upvote 0
DonManfred said: Android 6 does not provide the Mac anymore. Search Androids developer site or the forum. this has been asked a few times. Click to expand... I guess I also have to incorporate the Java code from Erel's example into my Activity but I don't know how to do that.
Erel B4X founder Staff member Licensed User Longtime User Mar 1, 2017 #5 DickD said: I found Erel's code below in another thread to get the MacAddress but I can't get it to work. Click to expand... Help us help you. Post the link to that thread... https://www.b4x.com/android/forum/t...s-with-serial-on-android-6.60452/#post-420300 DickD said: I guess I also have to incorporate the Java code from Erel's example into my Activity but I don't know how to do that. Click to expand... Just copy and paste it. Note that it returns the Wifi mac address not Bluetooth. Upvote 0
DickD said: I found Erel's code below in another thread to get the MacAddress but I can't get it to work. Click to expand... Help us help you. Post the link to that thread... https://www.b4x.com/android/forum/t...s-with-serial-on-android-6.60452/#post-420300 DickD said: I guess I also have to incorporate the Java code from Erel's example into my Activity but I don't know how to do that. Click to expand... Just copy and paste it. Note that it returns the Wifi mac address not Bluetooth.
D DickD Active Member Licensed User Mar 1, 2017 #6 Erel said: Help us help you. Post the link to that thread... https://www.b4x.com/android/forum/t...s-with-serial-on-android-6.60452/#post-420300 Just copy and paste it. Note that it returns the Wifi mac address not Bluetooth. Click to expand... I guess that won't help me very much with my Bluetooth-based app. I'll have to abandon that part of it. What exactly were the programmers at Google thinking when they took this out of A.6? Upvote 0
Erel said: Help us help you. Post the link to that thread... https://www.b4x.com/android/forum/t...s-with-serial-on-android-6.60452/#post-420300 Just copy and paste it. Note that it returns the Wifi mac address not Bluetooth. Click to expand... I guess that won't help me very much with my Bluetooth-based app. I'll have to abandon that part of it. What exactly were the programmers at Google thinking when they took this out of A.6?
Erel B4X founder Staff member Licensed User Longtime User Mar 1, 2017 #7 DickD said: What exactly were the programmers at Google thinking when they took this out of A.6? Click to expand... Google do not want developers to have simple access to permanent ids. The wifi Mac will probably be removed in the future as well. Upvote 0
DickD said: What exactly were the programmers at Google thinking when they took this out of A.6? Click to expand... Google do not want developers to have simple access to permanent ids. The wifi Mac will probably be removed in the future as well.