Hi, Did you see any CSP related error messages? If that is the case and you are developing a privileged app, I would suggest you put all your code in a separate JS file, and include that JS file in your html file.
BTW, you may refer to the following link for more details on developing packaged apps. https://developer.mozilla.org/en-US/docs/Web/Apps/Packaged_apps Thanks. Best regards, Rudy, Mozilla Taiwan On Mon, Jul 15, 2013 at 5:45 PM, <[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 > _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
