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:
Methods
addRecommendations()
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”com.amazon.apmf.Uuid[]addRecommendations(Recommendation*[]recommendations)
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
SecurityError— or InvalidArgumentError
removeRecommendations()
Removes recommendations previously added by a client. Any recommendation IDs specified in the recommendationIds array that were added by a call tovoidremoveRecommendations(com.amazon.apmf.Uuid[]recommendationIds)
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().

