Taifun Telephone Manager not working

Hello!
I need to pick the telephone number from the device. I tried to use Taifun's extension but it didn't work even with the examples given, which give the next message:

I get " Runtime Error getLine1NumberForDisplay:Neither user 10388 nor current process has android.permission.READ_PHONE_STATE, androind.permission.READ_SMS, or android.permission.READ_PHONE_NUMBERS.
End aplicantion."

Android 12.1
Any help or other extension to do it. I only need to pick the telephone number of the device.

Thanks

2 Likes

Did you ask for READ_PHONE_STATE permission correctly, as in the examples provided ?

Yes. We use exactly the example file, and we get that message. The app as for the permision and I accept but that is the massage that appeared after all.

Thank you for the report... seems to be a SDK31 issue... I will check after my vacations...

Taifun

Hello @Taifun we have used the exact example file (example 1) and have had no success. All fields produce a null vaue.

Correction, all fields produce a value except for Phone number. Phone number remains null.

From the documentation

Note: This is no guaranteed solution, because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. As workaround you always can use this solution.

Taifun

Thanks for your patience and your efforts at produing this extension. I am trtying to bring to light the fact that we get this error:

"Runtime Error getLine1NumberForDisplay:Neither user XXXX nor current process has android.permission.READ_PHONE_STATE, androind.permission.READ_SMS, or android.permission.READ_PHONE_NUMBERS."

We get this error when using Example 1 provided in your documetation. We use the exact file.

1 Like

Currently, your extension adds the READ_PHONE_STATE permission to the Manifest (eg to get a phone number)

But according to https://developer.android.com/ you need the READ_PHONE_NUMBERS permission for later vesrions.

Refer to: Permissions updates in Android 11  |  Android Developers

1 Like

Thank you for investigating... I will check soon...
Taifun

the updated version is now available on my webpage

Taifun