I'm following the Samsung SAP provider/consumer tutorial and I'm getting a security error when I run the connect() method:
function connect() {
console.log("trying to connect");
document.getElementById('label').innerHTML = 'trying to connect';
if (SASocket) {
alert('Already connected!');
return false;
}
try {
webapis.sa.requestSAAgent(onsuccess, onerror);
} catch(err) {
console.log("exception [" + err.name + "] msg[" + err.message + "]");
document.getElementById('errorlabel').innerHTML = "exception [" + err.name + "] msg[" + err.message + "]";
}
}
js/main.js (74) :exception [SecurityError] msg[The application does not have the privilege to call this method.]
In my config.xml I have:
<tizen:privilege name="http://devloper.samsung.com/privilege/accessoryprotocol"/?
Do I need anything else e.g. a certificate? I can run the sample projects no problem without my own certificate but do I need a certificate if I created the app myself from scratch?
Update - Solution: Two things - 1. typo! devloper should be developer - 2. @Nana Ghartey is also correct - a certificate is needed to test on the device, get this by sending a CSR to Samsung (details on their developer site).