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 IRecommendationManager2

interface IRecommendationManager2
Extends IRecommendationManager 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. Example of adding Recommendation2 objects:
Example for removing a recommendation using uuid (ex: uuidAdded) returned previously from addRecommendations2 call:
Example for removing all recommendations sent from this package:

Methods

addRecommendations2()

com.amazon.apmf.Uuid[] addRecommendations2(Recommendation2*[] recommendations)
The Recommendation Manager API adds recommendations to the recommendation manager database. The launcher queries the database and displays the recommendation home screen. 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. Privilege: “com.amazon.privilege.security.file-sharing”

Parameters

recommendations
Recommendation2*[] — Required Array of Recommendation2 objects

Returns

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

Throws

  • SecurityError — If calling the application does not have the required privilege.
  • 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

Last modified on October 29, 2026