Android Question Use Phone number for login

sigster

Active Member
Licensed User
Longtime User
Hi

Do all mobile save device Phone number so I can use it for pin number when the user call data from Mysql
or is it better to use GetDeviceId

Regards
Sigster
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Not all mobiles can provide their phone number because not all sim cards have that number written in.
 
Upvote 0

sigster

Active Member
Licensed User
Longtime User
Thanks for the Replay

This is how I do this


B4X:
    Dim pid As PhoneId   
    Dim Encoded64 As String
    Dim Conv As ByteConverter
    Encoded64 = su.EncodeBase64(Conv.StringToBytes(pid.GetDeviceId,"UTF-8"))
    db.QueryASync("SELECT username,pin FROM users WHERE pin = '" & Encoded64 & "';", 11)

Regards
Sigster
 
Upvote 0
Top