[Tizen Application-dev] SecurityError when trying to retrieve address book

Jeremy Ozog ozog.jeremy at gmail.com
Sat Jun 29 12:10:09 GMT 2013


Hi all,

I am blocked by a SecurityError when trying to retrieve the default address
book in a Web app.

Here is what I have :

1) An HTML file with a button calling a Javascript function :

<button onclick="add_contact()">Ajouter</button>

2) In the Javascript function, I try to retrieve the default address book
(this raises the SecurityError) :

var addressBook = tizen.contact.getDefaultAddressBook();

3) In my config.xml file, I have set read and write privileges for contacts
(the "read" one is necessary for getDefaultAddressBook according to the
documentation) :

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="
http://tizen.org/ns/widgets" id="http://yourdomain/TizenDevlabContact"
version="1.0.0" viewmodes="maximized">
    <tizen:application id="SocHHBX9kD.TizenDevlabContact"
package="SocHHBX9kD" required_version="2.1"/>
<tizen:privilege name="http://tizen.org/privilege/contact.read" />
 <tizen:privilege name="http://tizen.org/privilege/contact.write" />
<content src="index.html"/>
    <icon src="icon.png"/>
    <name>TizenDevlabContact</name>
</widget>

Any idea what I am missing?

Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/application-dev/attachments/20130629/dab06dfc/attachment.html>


More information about the Application-dev mailing list