El viernes, 1 de marzo de 2013 11:22:02 UTC+1, [email protected] escribió:
> 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
Hi Jordano,
Thanks for your help! This is my first app... :-)
Yes i have the read/write permissions in my manifest file:
{
"version": "0.1",
"name": "Your App",
"description": "Your new awesome Open Web App",
"launch_path": "/index.html",
"icons": {
"16": "/applogos/logo16.png",
"32": "/applogos/logo32.png",
"48": "/applogos/logo48.png",
"64": "/applogos/logo64.png",
"128": "/applogos/logo128.png"
},
"developer": {
"name": "Marcos",
"url": "http://yourawesomeapp.com"
},
"installs_allowed_from": ["*"],
"locales": {
"es": {
"description": "Su nueva aplicación impresionante Open Web",
"developer": {
"url": "http://yourawesomeapp.com"
}
},
"it": {
"description": "Il vostro nuovo fantastico Open Web App",
"developer": {
"url": "http://yourawesomeapp.com"
}
}
},
"permissions": {
"contacts":{ "access": "readwrite" },
}
}
Any other ideas??
Thanks!!
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps