How to get sim card contacts in ionic framework or cordova

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-23 18:12:07

问题


I am trying to get All contact from Phone and Sim card in ionic frame work.I got all contact from Phone but not from SIM

I tried Link for NGCORDOVA CONTACTS

but from this not able to get SIM contacts I tried to get sim info by SIM INFO PLUGIN

from this got all info but not sim contacts. what to do please help.


回答1:


Using following plugin DeviceInformation plugin. It is used to get the following information from your device and sim.

  1. Your unique Device ID
  2. Phone Number (if it is stored in your SIM card)
  3. Country ISO of your phone network provider
  4. Name of your network provider
  5. Your SIM Card Serial number
  6. Country ISO of your SIMcard
  7. Name of your SIM card mobile operator
  8. E-mail/Phone number used by apps listed in your Settings > Accounts & Sync list

var deviceInfo = cordova.require("cordova/plugin/DeviceInformation");
deviceInfo.get(function(result) {
        console.log("result = " + result);
    }, function() {
        console.log("error");
    });


来源:https://stackoverflow.com/questions/34543269/how-to-get-sim-card-contacts-in-ionic-framework-or-cordova

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!