Currently i am creating a safety application for the samsung smartwatch. I want users to be able to register on their smartphone and send these data to the smartwatch app. I followed the samsung tutorial for Accessory SAP communication. Everything works till i get the PEERAGENT_NO_RESPONSE error, the first parts work fine, it tries to connect without any problems.
The method i call on tizen is this:
SAAgent.setServiceConnectionListener(agentCallback);
var agentCallback = {
onconnect: function(socket){
alert("agentCallback connect" + socket);
SASocket = socket;
alert("connected");
SASocket.setSocketStatusListener(function(reason){
console.log("Service Connection lost, Reason: ["+ reason+"]");
disconnect();
})
},
onerror: function(error){
alert("agentCallBack"+error);
}
};
When i call SAAgent.setServiceConnectionListener(agentCallback), the android code below here is triggered. But this always returns PEERAGENT_NO_RESPONSE error.
@Override
protected void onServiceConnectionRequested(SAPeerAgent peerAgent){
//Toast.makeText(getBaseContext(), "TESTG", Toast.LENGTH_SHORT).show();
super.acceptServiceConnectionRequest(peerAgent)
}
I was wondering what i am doing wrong.