私はアンドロイド5以上の上で動作しますが、アンドロイド4 OSにはできませんが、電話から連絡先を読み取るアンドロイドアプリ(phonegap)に取り組んでいます電話からの連絡先を読んで、phonegapでcontacts.findを使って作業しているときに誰かがこの問題を経験したかどうか尋ねたいと思う。contacts.find does not work andandriod 4(phonegap)
document.addEventListener("deviceready", onDeviceReady, true); //the onDeviceReady function takes place when the app starts
function onDeviceReady() {
// find all contacts displayName, Name and phoneNumbers
var fields = ["displayName", "name", "phoneNumbers"];
var options = new ContactFindOptions();
options.filter = "";
options.multiple = true;
navigator.contacts.find(fields, onSuccess, onError, options);
\t var currentdate = new Date();
var datetime = currentdate.getDate() + "-"+(currentdate.getMonth()+1)
+ "-" + currentdate.getFullYear() + "T" + currentdate.getHours() + ":"
+ currentdate.getMinutes() + ":" + currentdate.getSeconds();
\t alert(datetime);
} \t
あなたはコードスニペットを投稿することができますか? –
ちょうどそれを今投稿しました –