how to do both way json communication using Samsung Accessory SDK?

how to do both way json communication using Samsung Accessory SDK?

BY 02 Aug 2019 Tizen .NET

 

I am trying to implement a both way communication between my Xamarin.Android app and Samsung Galaxy watch. Basically it should be;
  • Phone connects to the watch and sends an initial data as json
  • user processes this json data, amends on the watch and sends back to the phone

in this case, data should be send back and forth on both way but Samsung Tizen documentation says One the of the should be provider and other should be Consumer according to this documentation

if I understand correctly, i can either send data from phone to watch or watch to phone as consumer only can send command/text to the provider. Is there anyway to achieve to send both way as i described above?

Beside that i dont quite understand the difference between these 2 architecture https://developer.samsung.com/galaxy-watch/develop/samples/companion/hello-net

https://developer.samsung.com/galaxy-watch/develop/samples/companion/hello-message-net

Both looks identical beside first one works with peer without connection, 2nd one must establish a connection. what is the advantage one over another? or difference?

 

Written by