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 IRecommendationManager

interface IRecommendationManager
Extends com.amazon.apmf.IStandard The RecommendationManager API allows you you to add and remove recommendations. RecommendationManager is a local recommendation service the runs on the device. It takes in recommendations provided by a client app and displays them on the device home screen. Example of adding a recommendation:
Example for removing a recommendation using uuid (ex: uuidAdded) returned previously from addRecommendations call:
Example for removing all the recommendation sent from this package:

Methods

addRecommendations()

com.amazon.apmf.Uuid[] addRecommendations(Recommendation*[] recommendations)
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. Privilege: “com.amazon.privilege.security.file-sharing”

Parameters

recommendations
Recommendation*[] — Required an array of Recommendation type objects

Returns

com.amazon.apmf.Uuid[] Uuid representing newly added recommendations. Each Uuid corresponds to a recommendation and can be used for removing the recommendations in future. SecurityError: if calling application does not have the required privilege. InvalidArgumentError: if size of a recommendation object exceeds 512KB (excluding contentImage size) or if mandatory fields are empty/invalid or content image is not of specified dimensions and size, or recommendations array size is > 20

Throws


removeRecommendations()

void removeRecommendations(com.amazon.apmf.Uuid[] recommendationIds)
Removes recommendations previously added by a client. Any recommendation IDs specified in the recommendationIds array that were added by a call to addRecommendations() are removed. Any IDs that are not found are ignored.

Parameters

recommendationIds
com.amazon.apmf.Uuid[] — Required array that contains recommendation ids to be removed.

removeAllRecommendations()

void removeAllRecommendations()
Removes all recommendations added by calling addRecommendations().
Last modified on October 29, 2026