Hi,
I'm trying to migrate an wearable app from 2.3 to 2.3.1 which have installed Samsung Accessory Protocol SDK but I'm having different errors, the first one was about permissions, I had this permission:
<tizen:privilege name="http://developer.samsung.com/privilege/accessoryprotocol"/>
And when I tried to install my app in my smart watch I got an error saying that I should use this one:
<tizen:privilege name="http://developer.samsung.com/tizen/privilege/accessoryprotocol"/>
I made this change but when I tryied to run the app I got next error: Unknown Error Internal Error running the code to start accessory protocol in this line: webapis.sa.requestSAAgent(requestOnSuccess, requestOnError);
I've tried also start from scratch an app using the manual which Samsung offer to create a web companion app
http://developer.samsung.com/gear/develop/getting-started/web-companion/setup-sdk
Here how to config your web companion app:
http://developer.samsung.com/gear/develop/getting-started/web-companion/use-sap
Here how to run Accessory protocol:
http://developer.samsung.com/gear/develop/getting-started/web-companion/interact-device
So far this is my code:
function requestOnSuccess (agents) {
alert("requestOnSuccess");
var i = 0;
for (i; i < agents.length; i += 1) {
if (agents[i].role === "PROVIDER") {
SAAgent = agents[i];
break;
}
} /* Set listener for upcoming connection from Consumer */
SAAgent.setServiceConnectionListener(connectionListener);
}
function requestOnError (e) { alert("requestOnError"); }
/* Requests the SAAgent specified in the Accessory Service Profile */
if(CHANNELID ==""){
alert("requestSAAgent");
webapis.sa.requestSAAgent(requestOnSuccess, requestOnError);
}
}
catch(e){
alert(e);
}
And this is my config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="*********" version="1.0.0" viewmodes="maximized">
<tizen:application id="*********" package="******" required_version="2.3.1"/>
<content src="index.html"/>
<feature name="http://developer.samsung.com/tizen/feature/network.accessory_protocol"/>
<feature name="http://tizen.org/feature/screen.size.normal"/>
<feature name="http://tizen.org/feature/network.bluetooth.le"/>
<feature name="http://tizen.org/feature/sensor.heart_rate_monitor"/>
<icon src="icon.png"/>
<tizen:metadata key="AccessoryServicesLocation" value="res/xml/accessoryservices.xml"/>
<name>EcoLog</name>
<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:privilege name="http://tizen.org/privilege/healthinfo"/>
<tizen:privilege name="http://tizen.org/privilege/bluetooth.admin"/>
<tizen:privilege name="http://tizen.org/privilege/bluetooth.gap"/>
<tizen:privilege name="http://tizen.org/privilege/power"/>
<tizen:privilege name="http://tizen.org/privilege/application.info"/>
<tizen:privilege name="http://tizen.org/privilege/package.info"/>
<tizen:privilege name="http://developer.samsung.com/tizen/privilege/accessoryprotocol"/>
<tizen:profile name="wearable"/>
<tizen:setting background-support="enable" encryption="disable" hwkey-event="enable"/>
<tizen:setting hwkey-event="enable"/>
</widget>
Everything was working well until I migrate from 2.3 to 2.3.1
Does anyone know what It's going on? Any help would be really appreciated.
Cheers,
Miguel