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:
Methods
addRecommendations2()
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”com.amazon.apmf.Uuid[]addRecommendations2(Recommendation2*[]recommendations)
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
contentImageandcontentImageUriare missing - The provided
contentImagebyte array doesn’t meet size or dimension requirements

