Hi I have the following error and it only started to present with android 11, with previous versions it works perfect
an error has_ocurre in, security description:
getline1numberfordisplay : Neither user 10019 nor current proccess has
android.permision.READ_PHONE_STATE, android.permission.READ_SMS or
android.permission.READ_PHONE_NUMBER
This is the code that is not working for me, I clarify that it only occurs in version 11 of andriod
B4X:
Sub getPhoneNumber As String
'--------------------------------
Dim pID As PhoneId
Dim phonenumber As String
phonenumber = pID.GetLine1Number
phonenumber=""
Return phonenumber
End Sub
Starting from Android 6 there is an Api from Google which can Listen for a Incoming SMS for you. But you do not need any Permission for this. The SMS ends up in the Devices standard SMS App but your app can do an Phoneauthentification using an SMS from your Server. Usually the way would be: 1...
Starting from Android 6 there is an Api from Google which can Listen for a Incoming SMS for you. But you do not need any Permission for this. The SMS ends up in the Devices standard SMS App but your app can do an Phoneauthentification using an SMS from your Server. Usually the way would be: 1...
In Android 11 I think you can only get the phone number if your app is the default Phone app and you have requested READ_PHONE_NUMBERS permission. I've tried that permission and I get your error.
Hello thanks for your time,
It was basic network due to the size of the file and I could upload it to the server.
for that I should upload all the library that I use
let me see how i can do
hi
I think the problem was occurring because the client did not have a simcard on the phone
I inserted it into a "try cath" and voila it worked
thank
B4X:
Sub getPhoneNumber As String
'--------------------------------
Dim pID As PhoneId
Dim phonenumber As String
Try
phonenumber = pID.GetLine1Number
Catch
Log(LastException)
End Try
Return phonenumbe
End Sub