Languages

Menu
Sites
Language
SAP: HelloAccessory sample, failed to find peer agents

Hello,

I have added to my github samsung SAP samples.

https://github.com/jpgpuyo/SAPSamples/tree/master/HelloAccessory

Right now, HelloAccessory sample with android consumer and tizen provider is working between my smartphone and Samsung Gear S2, but when i want to integrate this sample on a custom android application, I'm not able to find peer agents. 

Which attributes are being used to do matching between Android Consumer and Tizen Provider?

In accessoryservices.xml, attribute "id" and attribute "name", must be equal on Consumer and Provider?

Can i have installed on Samsung Gear S2 another applications with same id on accesoryservices.xml? I think that this is not possible, but I'm not sure how matching works.

Can i have an android application with 2 different activities (consumer and provider) and 2 different accesoryservices.xml in the same android application?

Thank you,

Joaquim Puyo

View Selected Answer

Responses

4 Replies
Mark as answer
daniel kim

Hi,

I could connect another consumer which has same serviceProfile of accessoryservice.xml in this sample. but you need to disconnect current connection if another application which has same serviceProfile to the same connection. I would suggest you to check this sample code.

     http://developer.samsung.com/sample-app/list.do?pi=1&ps=10&pb=Y&ct=CT030000&sc=

Regards

Joaquim Puyo Garrido

Thank you daniel,

Finally, I have found the error. Attribute "id" from consumer didn't match the attribute "id" from provider. I wanted to do some tests with samsung examples, but i was not sure about test various examples with same service profile.

AVSukhov

Hello,

"In the Android manifest file, declare the service profile for the Samsung Accessory Protocol(SAP) connection. In the service profile the ID need not match the name; but the ID and the name of a service must match the corresponding values of its peer service to establish a connection with it. The ID and name values are casesensitive."

more info:

http://img-developer.samsung.com/contents/cmm/SamsungGearApplication_GettingStarted_1.0.pdf

Joaquim Puyo Garrido

Thank you,

Finally, I have found the error. Attribute "id" from consumer didn't match the attribute "id" from provider.

To simplify things, I decided to put the same name to application.name, serviceprofile.name and serviceprofile.id.