as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

default

API for adding and removing Recommendation2 objects on device.

RecommendationManager2 is a local recommendation service that handles the display and management of Recommendation2 objects submitted by client apps.

Extends

Constructors

new default()

new default(): default

Returns

default

Inherited from

default.constructor

Methods

addRecommendations()

static addRecommendations(recommendations): number[]

Adds new recommendations on this device to be shown to user. The application has a predefined maximum limit for the number of recommendations it can hold concurrently. If this limit is surpassed, the system will delete older items based on their received timestamps

required privilege : "com.amazon.privilege.security.file-sharing"

Parameters

recommendations

Recommendation[]

Returns

number[]

Inherited from

default.addRecommendations


addRecommendations2()

static addRecommendations2(recommendations): number[]

Adds new Recommendation2 objects to be displayed on the device.

The application has a predefined maximum limit of 20 concurrent recommendations, set by RecommendationManager. If this limit is exceeded, the system will delete older items based on their received timestamps. For recommendations using contentImageUri, the image will be downloaded asynchronously. If the image download fails, an error message is logged on the device and the recommendation is removed.

Parameters

recommendations

Recommendation2[]

Array of Recommendation2 objects to add.

Returns

number[]

Array of Uuids corresponding to added recommendations. Each Uuid corresponds to a recommendation and can be used for removing the recommendation in the future.

Privilege

"com.amazon.privilege.security.file-sharing"

Throws

SecurityError If calling the application does not have the required privilege.

Throws

InvalidArgumentError If any of these conditions occur: - Recommendation size exceeds 512KB - Mandatory fields are empty or invalid - Both contentImage and contentImageUri are missing - The provided contentImage byte array doesn't meet size or dimension requirements - Recommendations array size is > 20


getMajorVersion()

static getMajorVersion(): number

Get the Major version of the underlying native module. This can be used to make version checks.

Returns

number

Overrides

default.getMajorVersion


getMinorVersion()

static getMinorVersion(): number

Get the Minor version of the underlying native module. This can be used to make version checks.

Returns

number

Overrides

default.getMinorVersion


getPatchVersion()

static getPatchVersion(): number

Get the patch version of the underlying native module. This can be used to make version checks.

Returns

number

Overrides

default.getPatchVersion


removeAllRecommendations()

static removeAllRecommendations(): void

Removes all the recommendations sent previously by this client.

Returns

void

Inherited from

default.removeAllRecommendations


removeRecommendations()

static removeRecommendations(ids): void

Removes recommendations sent previously. Any recommendation id present for this client are removed, any ids not found are ignored.

Parameters

ids

number[]

array that contains recommendation ids to be removed.

Returns

void

Inherited from

default.removeRecommendations


Last updated: Sep 30, 2025