macdonst / TelephoneNumberPlugin

67 stars 41 forks source link

"TelephoneNumber" plugin not work with phonegap build 3.1 #6

Closed bau720123 closed 10 years ago

bau720123 commented 10 years ago

"TelephoneNumber" plugin not work with phonegap build 3.1 my code is here http://www.littlebau.com/tel.html

but it will always alert "error"

soulseekah commented 10 years ago

Navigate over to Settings > About Phone > Status on your device and look at the "My phone number" field. Is it "Unknown"? Tough luck then. It's not always possible to get the phone number.

See https://stackoverflow.com/questions/20684711/installation-of-plugincom-simonmacdonald-telephonenumber-in-phonegap-app/20755651#20755651 for more information.

bau720123 commented 10 years ago

YES! "My phone number" field is "Unknown" but,I really have a phone number ==|| I don't know why the field is "Unknown" ,is my problem?

soulseekah commented 10 years ago

That's the way Android works, unfortunately, some operators do not store the number in the SIM card, so Android can't read it; there's simply no way to find the number out just like that.

bau720123 commented 10 years ago

Totally know what you mean I want to ask,if the field is not "Unknown",so,it it will alert my phone number?

soulseekah commented 10 years ago

Yes, if hte number is stored on the SIM card then the field will not be "Unknown", and your app and this plugin will be able to get the number without returnin null or an empty string.

bau720123 commented 10 years ago

OK~thanks a lot