I have my Companion applications that are working fine with Tizen 4.0.
Now the users of my application are reporting me a bug when they install my application on Watch 3 (Tizen 5.5).
The bug seems related to SAFileTransfer error.
The reason of the fail is :
SAFileTransfer.ERROR_PEER_AGENT_NO_RESPONSE
So the Companion app on smartPhone is able to get agents peers correctly.
#FindPeerAgents Status : [peeragent found] and peerAgents [[Lcom.samsung.android.sdk.accessory.SAPeerAgent;@192459]
and this is the Peer object:
#PeerAgent: PeerAgent - id:47375 containerId:33725 FriendlyName:WhatsMedia Profile Version:1.0 PeerAccessory - Id:54541 Name:GEAR_SERIES Address:08:BF:A0:5D:FA:C5 TransportType:2 ProductId:SM-R840 VendorId:SAMSUNG APDU:2097152 SSDU:65524 Accessory ID:SAMSUNG_ACCESSARY__08:BF:A0:5D:FA:C5 MXDU:65517 Encryption padding:100 MexSupport:0 SocketSupport:1 and mPeerAgentStatus 0
but when I try to invoke the
SAFileTransfer.send(mPeerAgent, mSelectedFileName);
on the callback onTransferCompleted() I receive an error : SAFileTransfer.ERROR_PEER_AGENT_NO_RESPONSE
I’m using accessory-v2.6.1.jar in my Android application and following the accessoryservices.xml in both the app:
- accessoryservices.xml on SmartPhone application:
<application name = "WhatsMedia">
<serviceProfile
id="/service/whatsmedia"
name="WhatsMedia"
role="consumer"
serviceImpl="com.whatsmedia.android.sender.FileTransferSender"
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>
</application>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<files-path name="my_images" path="." />
<cache-path name="my_cache" path="." />
<external-path name="ext" path="." />
</paths>
- accessoryservices.xml on Tizen application:
<?xml version="1.0" encoding="UTF-8"?>resources>
application name=“WhatsMedia”>
serviceProfile
autoLaunchAppId=“IqjHbNhtlB.WhatsMedia”
id=“/service/whatsmedia”
name=“WhatsMedia”
role=“provider”
version=“1.0”>
supportedTransports>
transport type=“TRANSPORT_BT”/>
transport type=“TRANSPORT_WIFI”/>
/supportedTransports>
serviceChannel
id=“107”
dataRate=“low”
priority=“low”
reliability=“enable”>
/serviceChannel>
/serviceProfile>
/application>
/resources>
On the Watch side unfortunately I don’t see any error since my users are reporting me this bug.
I tried to create a beta version to show some logs and it seems never arrived a SAAgent.acceptServiceConnectionRequest so is never created a “SAP socket to accept an incoming connection for
a specific peer”, but I cannot be sure about this since I didn’t debug my application on Tizen 5.5 device.
Of course, on the Device Manager in Tizen Studio, the Emulator w-5.5-circle-x86 not support webapis because is not installed the SAP framework ! And in the Samsung test LAB remote we have only devices with Tizen 4.0 !
I’m wondering in which way tizen developers should test their application on Tizen 5.5 !!! Should I buy all the real devices to test it ? Actually tizen 5.5 is installed only to Watch 3.
This situation is really frustrating me.
I hope someone could help me or give me some hints.
Best