Is it possible to create a bi-directional file transfer application (between Galaxy watch and Android phone) using Samsung Accessory Protocol? I currently have my application transferring file from the watch to the phone but I am unable to have to transfer file from phone to the watch. It would be great if anyone could point out some resources that I can take a look at or if this is possible. Thank you!
Yes, SAP allows to send and receive files.
FAQ about SAP: Galaxy Accessory - Build | Samsung Developers
This is my current accessoryservices.xml on the Android side. Are you allowed to define two different service profiles (one for receiving and one for sending) as shown below? Thank you.
<resources>
<application name = "FileTransferReceiver">
<serviceProfile
id="/filetransfer/one"
name="FileTransferReceiver"
role="provider"
serviceImpl="sensing_project.sensingApp.FileTransferReceiver"
version="1.0"
serviceLimit="ANY"
serviceTimeout="10">
<supportedTransports>
<transport type="TRANSPORT_BT"/>
<transport type="TRANSPORT_WIFI"/>
</supportedTransports>
<serviceChannel
id="107"
dataRate="low"
priority="low"
reliability= "enable"/>
</serviceProfile>
<serviceProfile
id="/filetransfer/two"
name="FileTransferSender"
role="consumer"
serviceImpl="sensing_project.sensingApp.FileTransferSender"
version="1.0"
serviceLimit="ANY"
serviceTimeout="10">
<supportedTransports>
<transport type="TRANSPORT_BT"/>
<transport type="TRANSPORT_WIFI"/>
</supportedTransports>
<serviceChannel
id="108"
dataRate="low"
priority="low"
reliability= "enable"/>
</serviceProfile>
</application>
</resources>
Just as a reference, this is my accessoryservices.xml on my Tizen web watch application side,
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<application name="FileTransferReceiver" >
<serviceProfile
id="/filetransfer/one"
name="FileTransferSender"
role="consumer"
version="1.0">
<supportedTransports>
<transport type="TRANSPORT_BT" />
<transport type="TRANSPORT_WIFI"/>
</supportedTransports>
<serviceChannel
id="107"
dataRate="low"
priority="low"
reliability= "enable">
</serviceChannel>
</serviceProfile>
<serviceProfile
id="/filetransfer/two"
name="FileTransferReceiver"
role="provider"
version="1.0">
<supportedTransports>
<transport type="TRANSPORT_BT"/>
<transport type="TRANSPORT_WIFI"/>
</supportedTransports>
<serviceChannel
id="108"
dataRate="low"
priority="low"
reliability="enable">
</serviceChannel>
</serviceProfile>
</application>
</resources>
YES, sap allows to send and recieve files
Good to know. Then there must be an issue with the actual logic rather than the config files. Thank you!