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 - BothcontentImage and contentImageUri are missing - The provided contentImage byte array doesn’t meet size or dimension requirements - Recommendations array size is > 20

