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

The phone number unable to get in some kind of android mobile. Why? #11

Closed Gobi09 closed 8 years ago

Gobi09 commented 8 years ago

The phone number not getting in all the mobiles. why? But it shows carrier name, country code etc but not phone number. Please tell me why this plugin not getting mobile number from all kind of android mobile. How to overcome this issue.. My coding is: " var dataCarrier;

  function successCallback(result) {
      alert(result);//give me [object][object]
      alert(result['carrierName']+" carrierName");//give me 'Verizon'
      alert(result['countryCode']+" countryCode");//give me 'Verizon'
      alert(result['mcc']+" mcc");//give me 'Verizon'
      alert(result['mnc']+" mnc");//give me 'Verizon'
      alert(result['callState']+" mcc");//give me 'Verizon'
      alert(result['phoneNumber']+" mob num")
      dataCarrier = result['phoneNumber'];
      alert(dataCarrier )
  }

  function errorCallback(error) {
      alert(error);
  }

  window.plugins.sim.getSimInfo(successCallback, errorCallback);

"

Its working fine in some android mobile...

Please tell me How to solve this issue..

pbakondy commented 8 years ago

See #5

Gobi09 commented 8 years ago

Thanks for your replay. Please tell me how to get " sim serial number " and " IMEI Number " in ionic framework.

pbakondy commented 8 years ago

https://github.com/pbakondy/cordova-plugin-sim/releases/tag/v1.1.0