Dear Appery,
using phonegap contacts, what is the correct way to retrieve a specific record (contact) based on its ID# say 5437?
Many thanks in advance!
Best,
R.
some progress but no joy yet, here's what i did so far:
and on the success event i have:
code
for (var i=0;i<data.length;i++)
{
var phoneNumbers = data.phoneNumbers;
for (var j=0;j<phoneNumbers.length;j++)
{
var type = phoneNumbers[j].type;
var phone = phoneNumbers[j].value;
alert(type + ": " + phone);
}
/code
when fired i get the correct ID but then the app stuck on the spinner...
Hello! You can't search using spesific id - it searches through all the fields. Just specify needed id in filter field and then on service success event add additional filter to exclude records which have different id:
codefor (var i=0; i<data.length; i++) {
if (data.id == '5437') {
var phoneNumbers = data.phoneNumbers;
for (var j=0; j<phoneNumbers.length; j++) {
var type = phoneNumbers[j].type;
var phone = phoneNumbers[j].value;
alert(type + ": " + phone);
}
break;
}
}/code