roblav96 / nativescript-telephony

A Nativescript plugin to get the device's SIM data (carrier name, mcc mnc, country code, telephonenumber, etc)
Other
22 stars 9 forks source link

Cannot get phone number #7

Open burawi opened 6 years ago

burawi commented 6 years ago

I added <uses-permission android:name="android.permission.READ_PHONE_STATE"/> in App_Resources/android/AndroidManifest.xml, rebuilt the app then run it. And got an empty string in phoneNumber

juantfq commented 6 years ago

The same is happening to me.

It works fine on Virtual Devices, but on my physical device the phoneNumber parameter is empty.

countryCode, simOperator, carrierName are fulfilled, but phoneNumber is returned like this:

"phoneNumber": ""

Virtual Devices tested: Google Nexus One API 23, Google Nexus 5x API 27 Physical device: OnePlus One - Android 6.0.1.

¿Could you please help us?

vcarlosrb commented 6 years ago

I have the same problem on physical device. "phoneNumber" is empty.

msaelices commented 6 years ago

Same problem.

cristiansanchezcfs commented 5 years ago

Hi all!! someone knows about this issue?? i tried get my phoneNumber but im getting an empty string too.

elmiguedev commented 5 years ago

Same problem, there is a new solution for that????

Puru0911 commented 5 years ago

Hey all anyone got any solution to these I'm having the same problem.

romangorisek commented 4 years ago

Was just researching this and the problem is addressed here: cordova-plugin-sim "Notice: the content of phoneNumber is unreliable (see here, here, and here article). Sometimes phoneNumber is only an empty string."

This issue should be closed.