What kind of error are you receiving?

On 15/07/13 11:45, [email protected] wrote:
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




________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar 
nuestra política de envío y recepción de correo electrónico en el enlace 
situado más abajo.
This message is intended exclusively for its addressee. We only send and 
receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to