Introduction

Accessory allows you to develop applications on Samsung Smart Devices and Accessory Devices. You can connect Accessory Devices to Samsung Smart Devices without worrying about connectivity issues or network protocols. You can use Accessory to:

  • Advertise and discover Accessory Services.

  • Set up and close Service Connections with one or more logical Service Channels.

  • Support Service Connections using a range of connectivity options.

  • Configure Accessory Service Profiles and roles for Accessory Peer Agents.

  • Support Accessory Message.

Terms

Smart Device : a device capable of full user interaction and data processing, usually an Android mobile device.

Accessory Device : a smaller device which enhances the Smart Device's features, usually a Samsung Galaxy Watch device with Tizen OS.

Accessory Profile / Profile : a service implemented by an application and registered within the SAP framework. Communication is only possible when both devices have an application supporting the same Profile. Every application developer can define own profile. Profile is identified by a Profile ID string (e.g. "/my/own/gallery", "/sample/hello", "/sensors").

Channel : a part of a profile definition. Data exchange is divided into separate channels which can be used simultaneously. A Channel is identified by a number in the range 0-65535.

Accessory Framework

Architecture

See section 1.3 Architecture of Programming Guide for Android

Registration - profile configuration

Every application which makes use of Accessory Framework must describe the service profiles. Service profiles configuration is contained in an XML file included in the application. The default location of such configuration is the res/xml/accessoryservices.xml.


<resources>
  <application name="HelloAccessoryConsumer">
    <serviceProfile
        id="/sample/hello"
        name="hellosap_consumer"
        role="consumer"
        autoLaunchAppId="org.tizen.hellosap.consumer"
        version="1.0">
      <supportedTransports>
        <transport type="TRANSPORT_BT"/>
      </supportedTransports>
      <serviceChannel
          id="104"
          dataRate="low"
          priority="low"
          reliability="enable">
      </serviceChannel>
    </serviceProfile>
  </application>
</resources>
    

For more information about the options, see section 3.3.2 Defining Accessory

Development Environment

The applications using Samsung.Sap are built using the Visual Studio with the Visual Studio Tools for Tizen extension.

To use the Samsung.Sap library, add the Samsung.Sap NuGet reference in your application.

Devices

Install the Galaxy Wearable application on the Android smart phone.

Connect the Samsung Galaxy watch with the Android mobile.