thats my problem. i use this code and only get null
var allContacts = navigator.mozContacts.getAll({});
allContacts.onsuccess = function(event) {
var cursor = event.target;
if (cursor.result) {
if(cursor.result['tel']!=null)
{
$("#res").append((cursor.result['givenName']+" "
+cursor.result['familyName']+"<br/>"));
for(i=0;i<cursor.result['tel'].length;i++)
{
$("#res").append("telf:
"+(cursor.result['tel'][i].value)+"<br/>");
}
alert(cursor.result['email']);
}
cursor.continue();
} else {
alert("No more contacts");
}
}
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g