luke2012 Well-Known Member Licensed User Longtime User Apr 20, 2012 #1 Good morning Community! In B4A how obtain the device ID ? I mean a name/code that identify (Unique) the Android device within all others devices ?
Good morning Community! In B4A how obtain the device ID ? I mean a name/code that identify (Unique) the Android device within all others devices ?
S salmander Active Member Licensed User Longtime User Apr 20, 2012 #2 if its a GSM device (mobile phone), then you can get imei by; B4X: Dim pID As PhoneId Dim imei As String imei = pID.GetDeviceId you need to enable Phone library in the Libs Tab. For Non-GSM devices (tablets), you can either get "android_id" or mac address. B4X: Dim phn As Phone Dim androidID As String ' For android_id androidID = phn.getSettings("android_id") Last edited: Apr 20, 2012 Upvote 0
if its a GSM device (mobile phone), then you can get imei by; B4X: Dim pID As PhoneId Dim imei As String imei = pID.GetDeviceId you need to enable Phone library in the Libs Tab. For Non-GSM devices (tablets), you can either get "android_id" or mac address. B4X: Dim phn As Phone Dim androidID As String ' For android_id androidID = phn.getSettings("android_id")
vb1992 Well-Known Member Licensed User Longtime User Apr 20, 2012 #3 http://www.b4x.com/forum/basic4andr...-unique-id-alternative-phoneid.html#post83638 Upvote 0