Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ISerial

interface ISerial
Extends com.amazon.apmf.IStandard

Methods

makeSerialSettingBuilder()

ISerialSettingsBuilder* makeSerialSettingBuilder()
Make serial settings builder. This represents the settings used to create a serial connection or server.

Returns

ISerialSettingsBuilder* Returns pointer to this ISerialSettingsBuilder.

Throws


makeServer()

ISerialServer* makeServer(ISerialSettings* settings, ISerialServerListener* listener)
Create a serial server based on the provided settings. A serial server provides services for a designated UUID. The server accepts an incoming connection from a serial client connecting to that service. Privilege: com.amazon.bluetooth.privilege.serial

Parameters

settings
ISerialSettings* — Required Settings for the serial server, see [ISerialSettings].
listener
ISerialServerListener* — Required Callback for receiving event related to this server, see [ISerialServerListener].

Returns

ISerialServer* Returns a server interface, see [ISerialServer]. The server interface is a smart pointer and it should be stored as long as the caller wants to use this server. If the reference to the server is dropped, all the connections related to this server are automatically disconnected if they were connected and becomes invalid.

Throws


makeConnectionInterface()

ISerialConnection* makeConnectionInterface(IDevice* device, ISerialSettings* settings, ISerialConnectionListener* listener)
Create a serial connection interface for a specific device using the provided settings. This does not connect to the device directly, the method connect of the [ISerialConnection] interface must be called to perform the connection.

Parameters

device
IDevice* — Required The device to create the connection to.
settings
ISerialSettings* — Required Settings for the serial connection, see [ISerialSettings].
listener
ISerialConnectionListener* — Required Callback for receiving event related to this connection, see [ISerialConnectionListener]. If the connection is successful, the listener is called and provides the connection interface.

Returns

ISerialConnection* Returns a connection interface, see [ISerialConnection]. The connection interface is a smart pointer and it should be stored as long as the caller wants to use this connection. If the reference to the connection is dropped, the connection is automatically disconnected if it was connected.

Throws


Last modified on October 29, 2026