Languages

Menu
Sites
Language
Gear s3 : How to use SAP (provider or consumer or both)

Hi, I'm confused about SAP consumer and provider, so if the scenario like this :

- On android if there's and event, I will send data to the gear

- On gear, if user request something, it will initiate request to the android

 

So should I use provider or consumer in Gear/Android, or is it possible to use both in single app/service, if yes how to do it ?

 

Thanks

View Selected Answer

Responses

3 Replies
Mark as answer
Armaan-Ul- Islam

#Case 1 "- On android if there's and event, I will send data to the gear"

Provider: Android

Consumer: Tizen Gear

 

# Case 2- "- On gear, if user request something, it will initiate request to the android"

Provider: Tizen Gear

Consumer: Android

 

# Yes, it's possible to develop dual role in one application. I guess just to keep it simple sample applications are designed for one way connection.

 

For the Android end, this Guide seems a good one to me as it has step by step explanation. (No need to check out full book, Just Chapters in the begging)

http://developer.samsung.com/galaxy/accessory/guide

 

For Tizen end, There is a Guide integrated with IDE.

Tizen Studio> Help > Help Contents > Samsung Extension for wearable Native > Programming Guide > SAP

Tizen Studio> Help > Help Contents > Samsung Extension for wearable Native > Programming Guide > SAP > Related Info > Samsung Acceessory Protocol API

 

And Ofcourse You can check out the samples for Understanding. ( Merge the codes of two sample to create a bi-directional connection )

Gilad Eshkoli

#Case 1 "- On android if there's and event, I will send data to the gear"

Provider: Android

Consumer: Tizen Gear

 

# Case 2- "- On gear, if user request something, it will initiate request to the android"

Provider: Tizen Gear

Consumer: Android

 

Really? I thought that the Consumer is the one who initiate the request and the provider is the one responding to it, isn't it??

 

I have an Android application and a Gear app, and I would like to send a message from the Android to the Gear and "wake it up" so it will send sensors data on demand, so I will need the provider to be the Android and Gear as the Consumer? Not the other way around??

Armaan-Ul- Islam

Really? I thought that the Consumer is the one who initiate the request and the provider is the one responding to it, isn't it??

>> Yes, you're right It is. According to the Programming Guide > Section 1.3 (Page 9)

 

I just explained in that way for a simple, straight-forward understanding in case of single functionality. For your case,

Android->Consumer

Tizen ->Provider

 

Haven't Seen any API function in Galaxy Accessory SDK to "wake up" a tizen gear app. I've shared my suggestion in this thread of StackOverflow, Please check.