问题
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.
- Your unique Device ID
- Phone Number (if it is stored in your SIM card)
- Country ISO of your phone network provider
- Name of your network provider
- Your SIM Card Serial number
- Country ISO of your SIMcard
- Name of your SIM card mobile operator
- 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