com.samsung.android.sdk.accessory

Class SAPeerAgent

  • java.lang.Object
    • com.samsung.android.sdk.accessory.SAPeerAgent
  • All Implemented Interfaces:
    android.os.Parcelable


    public class SAPeerAgent
    extends java.lang.Object
    implements android.os.Parcelable
    SAPeerAgent represents a remote Accessory Peer Agent.

    This class encapsulates the information about a remote Accessory Peer Agent and the Accessory Device that the Accessory Peer Agent runs on.

    The application can check such information to decide whether to request a Service Connection with the Accessory Peer Agent, and whether to accept incoming Service Connection requests from the Accessory Peer Agent.

    Developer Guides

    For more information about using Accessory, please refer to the Accessory Programming Guide.

    • Method Detail

      • getPeerId

        public java.lang.String getPeerId()
        Returns the Accessory Peer Agent ID.
        Returns:
        The Accessory Peer Agent ID.
        Since:
        2.0.19
      • getAppName

        public java.lang.String getAppName()
        Returns the name of the application to which the Accessory Peer Agent belongs.
        Returns:
        The name of the application to which the Accessory Peer Agent belongs.
        Since:
        2.0.19
      • getProfileVersion

        public java.lang.String getProfileVersion()
        Returns the version of the Accessory Service Profile that the Accessory Peer Agent supports.
        Returns:
        The version of the Accessory Service Profile
        Since:
        2.0.19
      • isFeatureEnabled

        public boolean isFeatureEnabled(int type)
        Returns true if the Accessory feature on the remote Accessory Peer Agent is enabled.
        Parameters:
        type - The feature ID(must be (SA.DEVICE_ACCESSORY, SA.SERVICE_MESSAGE)).
        Returns:
        true if the Accessory feature is available on the remote Accessory Peer Agent, else false
        Throws:
        java.lang.IllegalArgumentException - Thrown if the feature ID passed is not valid.
        Since:
        2.5.0