View
 

iPhone: Get number of contacts

Page history last edited by Steve Gill 6 mos ago
function contactsCount(){
debug.log("contactCount");
navigator.contacts.contactsCount(onGotContactCount,onGotContactCountError);    
}
function onGotContactCount(num){
document.getElementById("contactCountDiv").innerHTML = "Contact Count : " + num;
}
function onGotContactCountError(err){
alert("error getting contacts :: " + err);
}

Comments (0)

You don't have permission to comment on this page.