语言

Menu
Sites
Language
Please contact us for a sample hello accessory.

hi. 

I have to try a hello accessory native samples between galaxy gear s2 and android phone (galaxy note 3).

First, may trouble getting the lack of attention to understand English. I'm sorry.

I had downloaded from the site http://developer.samsung.com/resources/gear - Gear|Companion Type - Hello Accessory(Native)

Android phone provider, a consumer has the Tizen (Galaxy gear s2).

Android import in apartment no problem with the app on their smartphones, it was up to the normal, Theisen import in the field of later with errors, which does not make a run, 
Create new project and, in (manifest xml, accessoryservices xml, sap, main c, remember that c) a necessary part gears with parts making Paste S school properly to allow the app isBecame run.

But Android and Bluetooth communications, but try connect peer _ _ _ find : connection is and Will Theisen sap the 26 c agent (231) > findsap agent _ _ _ peer sis failed called (- 1)Error log is happening.

An error occurring in the library not find the exact cause is determined they will expect.

I have a question on how to solve it.

Do you have any gear and between Android.

※ Theisen logs and logs, Android and Android with sauce and Android source http://blog.naver.com/mozzi4567 attached to here.

Thank you.

 

 

响应

1 回复
daniel kim

Hi,

I think that you need to add a code to initialize SAP module in your source. I would suggest you to refer to following code snippet.

--consumer.c--

static bool
 app_create(void *data)
 {
  /* Hook to take necessary actions before main event loop starts
     Initialize UI resources and application's data
     If this function returns true, the main loop of application starts
     If this function returns false, the application is terminated */
 object = data;

 create_base_gui(object);
  initialize_sap();

 return true;
 }

 

--accessoryservices.xml--

   <application name="org.example.consumer">
           <serviceProfile id="/sample/hello" name="consumer"   role="consumer" version="2.0">

 

And if you face a build problem with sample code on Tizen SDK 2.4 Rev3, I would suggest you to check this configration of IDE.

 Right-click your roject--> properties --> C/C++ General --> Paths and Sympbols --> GNU C -->  please change ${SBI_SYSROOT}/../wearable-2.3.1-device.core/usr/include/sap_client   to ${SBI_SYSROOT}/usr/include/sap_client

 

Regards