Get unique id for user
According to Android rules, We cannot use android_id or device_id or mac_address in new version android As well, Use sms is not good idea for this Please suggest to me for use unique id in each device for user I need to it for use payment and other Thanks
www.b4x.com
B4X:
Activity.LoadLayout("frmLoginElsis")
rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String , Result As Boolean)
If Result Then
' android_imei = numero.GetDeviceId NO DEVUELVE NADA A PARTIR DE ANDROID VERSION 10 07-10-2020
'Log("imei:" & numero.GetDeviceId)
android_id = serialPhone.GetSettings("android_id") ' ES UN VALOR hexadecimal SE PROBADO EN AN.10 DE LEO funciono
'Log("android : " & android_id)
'Log("serial sim:" & numero.GetSimSerialNumber) ' numero de sim no sirve por si no tiene sim
'Log("producto:" & serialPhone.Product)'no sirve
'Log("modelo:" & serialPhone.Model)
'Log("Manufacturer:" & serialPhone.Manufacturer)
'Dim hardware_serial As String = GetDeviceId1 'no an da en el celu si en el simulador a partir de 9 no anda
'Log("hard:" & hardware_serial) 'no an da en el celu si en el simulador a partir de 9 no anda
NumeroSerieIdapp = android_id
Else
'Log ("sin permiso")
ToastMessageShow("Permiso Denegada Phone" , True)
End If
[/QUOTE]