pbakondy / cordova-plugin-sim

:cherries: A cordova plugin to get the device's SIM data (carrier name, mcc mnc, country code, telephonenumber, etc)
MIT License
163 stars 100 forks source link

phoneNumber format #15

Closed sariyu closed 8 years ago

sariyu commented 8 years ago

It is working fine, but it is very useful to get phone number separete and country code separate. Is it possible to do that ?

pbakondy commented 8 years ago

You can get them separately with result.phoneNumber and result.countryCode

sariyu commented 8 years ago

result.phoneNumber gives result like +91xxxxxxxxxx for some networks and xxxxxxxxxx for other networks of same country. pbakondy i'm developing ionic cordova app, could you please share any working logic or code on showing the user with contacts of those who already have installed the same app like whats app / telegram.

pbakondy commented 8 years ago

I would suggest using the following library to unify the different phonenumber formats: https://www.npmjs.com/package/google-libphonenumber

I don't know any existing solution for "showing the user with contacts of those who already have installed the same app"