我正在使用「科爾多瓦」創建IOS和Android應用程序。 而我需要訪問設備的聯繫人。我使用該插件「org.apache.cordova.contacts」。科爾多瓦聯繫人插件 - 電子郵件null
下面是我用來做代碼的一部分,我得到迴應......
function ContactsCtrl($scope){
var options = new ContactFindOptions();
options.multiple = true;
options.filter = "Benoit";
var fields = ["displayName", "name", "nickname "];
navigator.contacts.find(fields, onSuccess, onError, options);
}
function onSuccess(contacts) {
var ret = '';
for (var i = 0; i < contacts.length; i++) {
for(x in contacts[i]){
ret += x+' :'+contacts[i][x]+"\n";
}
}
$('#resultContact').html(html);
}
和響應:
rawId :null
displayName :Nasher
name :[object Object]
nickname :null
phoneNumbers :null
emails :null
...
...
問題: 「電子郵件」字段和「phoneNumbers」字段總是空的(在android和iOs上),但它們存在於「通訊簿」中
任何人都有一個idee爲什麼?