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 IAdvertisementPayloadBuilder

interface IAdvertisementPayloadBuilder
Extends com.amazon.apmf.IStandard Interfaces for creating new advertisement payload instance.

Methods

addManufacturerId()

IAdvertisementPayloadBuilder* addManufacturerId(u16 manuId, u8[] manuData)
Utility function which add manufacturer specific data to the payload.

Parameters

manuId
u16 — Required Manufacturer ID.
manuData
u8[] — Required An array stored manufacturer data.

Returns

IAdvertisementPayloadBuilder* Returns pointer to this IAdvertisementPayloadBuilder.

addServiceData()

IAdvertisementPayloadBuilder* addServiceData(com.amazon.apmf.Uuid uuid, u8[] serviceData)
Utility function that which add service data to the payload.

Parameters

uuid
com.amazon.apmf.Uuid — Required The com.amazon.apmf.Uuid filled by user. 128-bit UUID for the service data. If using bluetooth defined 16-bit or 32-bit UUID, it must first be extended to a 128-bit UUID using the Bluetooth Base UUID.
serviceData
u8[] — Required An array stored service data

Returns

IAdvertisementPayloadBuilder* Returns pointer to this IAdvertisementPayloadBuilder Note: The UUID should be provided in little-endian format.

addServiceUUID()

IAdvertisementPayloadBuilder* addServiceUUID(com.amazon.apmf.Uuid uuid)
Utility function that service UUID to the payload. This API appends given UUID to the advertisement data and can be invoked multiple times to add additional UUIDs.

Parameters

uuid
com.amazon.apmf.Uuid — Required The com.amazon.apmf.Uuid filled by user. 128-bit UUID for the service. If using bluetooth defined 16-bit or 32-bit UUID, it must first be extended to a 128-bit UUID using the Bluetooth Base UUID.

Returns

IAdvertisementPayloadBuilder* Returns pointer to this IAdvertisementPayloadBuilder Note: The UUID should be provided in little-endian format.

includeDeviceName()

IAdvertisementPayloadBuilder* includeDeviceName(bool includeDeviceName)
Set to indicate whether to include the device name in advertisement payload.

Parameters

includeDeviceName
bool — Required True if included, false if not.

Returns

IAdvertisementPayloadBuilder* Returns pointer to this IAdvertisementPayloadBuilder.

includeTxPower()

IAdvertisementPayloadBuilder* includeTxPower(bool includeTxPower)
Set whether to include TX power level in advertisement data.

Parameters

includeTxPower
bool — Required True to include, false if not.

Returns

IAdvertisementPayloadBuilder* Returns pointer to this IAdvertisementPayloadBuilder.

build()

IAdvertisementPayload* build()
Build and return an advertisement payload object. This function constructs a Bluetooth Advertisement Payload with configured parameters and returns a pointer to IAdvertisementPayload as payload object.

Returns

IAdvertisementPayload* Returns pointer to IAdvertisementPayload.

Throws


Last modified on October 29, 2026