To use the SAP API, change some configurations in your application project:
Go to Project properties > C/C++ Build > Tizen Settings. In the Framework It should be select samsung-sap
Communicating with an Android application requires a declaration of descriptions about the Accessory Service Profile. The profile is declared in a separate XML file in the /res/xml folder of the application project. The actual path of the XML file can be described with ‘meta data’ in the tizen-manifest.xml file.
A. Add the accessoryservices.xml file in the /res/xml folder.
For an example file, see the following sample Accessory Service Profile. You can modify the id value of the serviceProfile element to define your application. The id value must be unique globally and it is also used in the Android side application to identify the service profile.
The service profile ID must start with ‘/’, followed by [0-9], [a-z], ‘_’, and ‘/’ (as delimiter). The maximum length is 30 characters. For more information about the XML file, see this.
<serviceProfile id="/org/example/myapp/my_message" name="MyMessage"
<serviceChannel id="110" dataRate="low" priority="low"
B. Add meta data to define the Accessory Service Profile XML file location.
Open the tizen-manifest.xml file in the Tizen manifest editor, and select the Advanced tab.
In the Meta Data section, click Add, define the key as accessory-services-location and the value as /res/xml/accessoryservices.xml, and click OK.
To use the SAP API, the http://developer.samsung.com/tizen/privilege/accessoryprotocol privilege must be added in the tizen-manifest.xml file.
Open the tizen-manifest.xml file in the Tizen manifest editor, select the Privilege tab, and click Add.
Add the privilege and click OK.