Hi!

Are you requesting the contacts permissions (write access) in the manifest?

As well, so far the contacts api requires your app to be privileged (also you 
can do this on the manifest):
https://developer.mozilla.org/en-US/docs/Apps/App_permissions

Cheers!
F.

On 1 Mar 2013, at 10:22, 
<[email protected]<mailto:[email protected]>> wrote:

Hi All,

I follow the example of the documentation to create a contact:

var contact = new mozContact();
contact.init({name: "Tom"}); // Bug 723206
var request = navigator.mozContacts.save(contact);
request.onsuccess = function() {alert("success");};
request.onerror = function() {alert("error")};

My app runs ok on the simulator but i can't save a contact.
Need i import any javascript library? is there any full example how to do this?

Thanks in advance,
Marcos
_______________________________________________
dev-webapps mailing list
[email protected]<mailto:[email protected]>
https://lists.mozilla.org/listinfo/dev-webapps


This electronic message contains information from Telefonica UK, Telefonica 
Europe or Telefonica Digital which may be privileged or confidential. The 
information is intended to be for the use of the individual(s) or entity named 
above. If you are not the intended recipient be aware that any disclosure, 
copying distribution or use of the contents of this information is prohibited. 
If you have received this electronic message in error, please notify us by 
telephone or email.
 
 
Switchboard: +44 (0)113 272 2000
Email: [email protected]
 
Telefonica UK Limited  260 Bath Road, Slough, Berkshire SL1 4DX Registered in 
England and Wales: 1743099. VAT number: GB 778 6037 85
Telefonica Europe plc  260 Bath Road, Slough, Berkshire SL1 4DX Registered in 
England and Wales: 05310128. VAT number: GB 778 6037 85
Telefonica Digital Limited  260 Bath Road, Slough, Berkshire SL1 4DX Registered 
in England and Wales: 7884976. VAT number: GB 778 6037 85
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to