lemonisdead Well-Known Member Licensed User Longtime User Apr 15, 2014 #1 Hi, Please could you help me with using Reflection to get the MAC address when a device connects to a phone ? I have already tried with StartingIntent.GetExtra but I am provided only Null. The StartingIntent.ExtrasToString is Bundle[{android.bluetooth.device.extra.DEVICE=00:18:A4:25:A6:8A}] Of course I was able to parse the string but the provided information change depending on the smartphone. So I would like to retrieve the MAC address for sure. For example, I can test if StartingIntent.HasExtra("android.bluetooth.device.extra.DEVICE") But StartingIntent.GetExtra("android.bluetooth.device.extra.DEVICE") returns null... Erel mentioned the method in this post but I am not smart enough to understand how to use Reflection. I have only found one post about Intent.getParcelableExtra. What is the <key> to use in the code ? Many thanks Last edited: Apr 15, 2014
Hi, Please could you help me with using Reflection to get the MAC address when a device connects to a phone ? I have already tried with StartingIntent.GetExtra but I am provided only Null. The StartingIntent.ExtrasToString is Bundle[{android.bluetooth.device.extra.DEVICE=00:18:A4:25:A6:8A}] Of course I was able to parse the string but the provided information change depending on the smartphone. So I would like to retrieve the MAC address for sure. For example, I can test if StartingIntent.HasExtra("android.bluetooth.device.extra.DEVICE") But StartingIntent.GetExtra("android.bluetooth.device.extra.DEVICE") returns null... Erel mentioned the method in this post but I am not smart enough to understand how to use Reflection. I have only found one post about Intent.getParcelableExtra. What is the <key> to use in the code ? Many thanks
Erel B4X founder Staff member Licensed User Longtime User Apr 16, 2014 #2 See the code I posted here: http://www.b4x.com/android/forum/threads/getting-bluetooth-device-id.38802/#content Upvote 0
See the code I posted here: http://www.b4x.com/android/forum/threads/getting-bluetooth-device-id.38802/#content
lemonisdead Well-Known Member Licensed User Longtime User Apr 16, 2014 #3 Many thanks Erel. For some reason I missed this post Upvote 0