Languages

Menu
Sites
Language
SecureElement privilege error

When I invoke tizen.seService.getReaders in web app, I get a SecurityError. It seems that I have no privilege to invoke this method while I have add secureelement privilege in config.xml. I can make no progress with this error. Who can tell me what happens? Thanks.

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 Replies
Raghavendra Reddy Shiva
Yes, the security error is due to not having the correct privileges to access the API. I don't see the same error , when i add the privilege to access the secureElement API. Do you still see the same SecurityError ? even after adding the privileges in the config file ? Just in case, double check in the config file (under Source Tab), you should be seeing the below line, if added correctly, Have tested with below sample code and it works. function success(readers) { console.log("Available Readers: "+ readers.length); for (var i = 0; i < readers.length; i++) { console.log("In loop"); if (readers[i].isPresent) console.log("Reader Name: " + readers[i].getName()); } } function GetReaders(){ console.log("GetReaders() called"); tizen.seService.getReaders(success, function(err) {console.log("To get readers is failed")}); } Of course in my case, the "readers.length" returns "0", as i don't have any UICC /SIM or any other secure elements on my phone. And also assuming you are using Tizen SDK 2.1/2.2, as this API is supported only from 2.1 or later..