i tried adding a contact to my simulator using APIs given. but, i'm unable to
add a contact.. i added 'contatcts' in permissions & i described "type":
"privileged" in manifest.webapp file.
Still, the following code not working
var person = new mozContact();
person.givenName = ["John"];
person.familyName = ["Doe"];
person.nickName = ["No kidding"];
var saving = navigator.mozContacts.save(person);
saving.onsuccess = function() {
alert('new contact saved');
person = saving.result;
};
saving.onerror = function(err) {
alert(""+err);
};
This example has been given in developers site.
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g