© 2014 Samsung Electronics Co., Ltd. All rightsreserved.
The Samsung Accessory Protocol (SAP) API offers services that enable mobile devices to establish connections and exchange data with accessory devices. The SAP-enabled devices can share string messages and files through the API.
The Samsung Accessory (SA) Service consists of the following entities:
The SA agent manages the connection set-up and the exchange of data with remote accessory peer agents. It is the main interface between the Samsung Accessory Service framework and applications. The SA agent can be either a service provider or consumer, as defined in the accessory service profile specification.
The remote accessory peer agent communicates with the SA agent. It includes information about the peer agent and the accessory device on which the peer agent runs.
The main features of the SAP API include:
Defining the accessory service profile
To use the SAP to communicate with other applications, you must define an accessory service profile in an XML file for your application. The profile specifies the communication details, such as the transport type, service channel, and application name.
You can establish a connection with a remote accessory peer agent.
You can exchange string messages between the service provider and consumer.
You can exchange files between the service provider and consumer.
You can close the connection between the service provider and consumer.