# ContentRecommendation

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:recommendation:28.0.0-alpha1  
Summary:[Nested Classes](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#nestedclasses)\|[Constants](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#constants)\|[Methods](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#)  

# ContentRecommendation

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
ContentRecommendation
`  
`

extends Object


``


`

|---|----------------------------------------------------------|
| java.lang.Object                                            ||
| ↳ | android.support.app.recommendation.ContentRecommendation |

<br />

*** ** * ** ***

The ContentRecommendation object encapsulates all application provided data for a single content recommendation item.

## Summary

|                                                                                                                                                                                                           ### Nested classes                                                                                                                                                                                                            ||
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class`      | [ContentRecommendation.Builder](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder) Builder class for[ContentRecommendation](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation)objects.                                                                                                                             |
| ` @interface` | [ContentRecommendation.ContentMaturity](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentMaturity) <br />                                                                                                                                                                                                                                                         |
| ` @interface` | [ContentRecommendation.ContentPricing](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentPricing) <br />                                                                                                                                                                                                                                                           |
| ` @interface` | [ContentRecommendation.ContentStatus](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentStatus) <br />                                                                                                                                                                                                                                                             |
| ` @interface` | [ContentRecommendation.ContentType](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentType) <br />                                                                                                                                                                                                                                                                 |
| ` class`      | [ContentRecommendation.IntentData](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentData) Object used to encapsulate the data to be used to build the[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)object associated with a given content recommendation, at the time this recommendation gets posted to the home Screen. |
| ` @interface` | [ContentRecommendation.IntentType](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentType) <br />                                                                                                                                                                                                                                                                   |

|                                                                                                                                                                                                                                                                                                                                                                                                                      ### Constants                                                                                                                                                                                                                                                                                                                                                                                                                      ||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `String` | [CONTENT_MATURITY_ALL](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_MATURITY_ALL) Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for all audiences.                                                                                                                                                                                                                                                                                                                                                                                                          |
| `String` | [CONTENT_MATURITY_HIGH](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_MATURITY_HIGH) Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for audiences of high maturity and above.                                                                                                                                                                                                                                                                                                                                                                                 |
| `String` | [CONTENT_MATURITY_LOW](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_MATURITY_LOW) Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for audiences of low maturity and above.                                                                                                                                                                                                                                                                                                                                                                                    |
| `String` | [CONTENT_MATURITY_MEDIUM](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_MATURITY_MEDIUM) Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for audiences of medium maturity and above.                                                                                                                                                                                                                                                                                                                                                                           |
| `String` | [CONTENT_PRICING_FREE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_PRICING_FREE) Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is free to consume.                                                                                                                                                                                                                                                                                                                                                                              |
| `String` | [CONTENT_PRICING_PREORDER](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_PRICING_PREORDER) Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available currently as a pre-order, and the price value provided is the purchase price for the item.                                                                                                                                                                                                                                                                                  |
| `String` | [CONTENT_PRICING_PURCHASE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_PRICING_PURCHASE) Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available for purchase, and the price value provided is the purchase price for the item.                                                                                                                                                                                                                                                                                              |
| `String` | [CONTENT_PRICING_RENTAL](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_PRICING_RENTAL) Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available as a rental, and the price value provided is the rental price for the item.                                                                                                                                                                                                                                                                                                     |
| `String` | [CONTENT_PRICING_SUBSCRIPTION](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_PRICING_SUBSCRIPTION) Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available as part of a subscription based service, and the price value provided is the subscription price for the service.                                                                                                                                                                                                                                                    |
| `int`    | [CONTENT_STATUS_AVAILABLE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_STATUS_AVAILABLE) Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is available, but needs to be first purchased, rented, subscribed or downloaded before it can be consumed.                                                                                                                                                                                                                                                                                                                                                      |
| `int`    | [CONTENT_STATUS_PENDING](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_STATUS_PENDING) Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is pending, waiting on either a download or purchase operation to complete before it can be consumed.                                                                                                                                                                                                                                                                                                                                                               |
| `int`    | [CONTENT_STATUS_READY](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_STATUS_READY) Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is available and ready to be consumed immediately.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `int`    | [CONTENT_STATUS_UNAVAILABLE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_STATUS_UNAVAILABLE) Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is not available.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `String` | [CONTENT_TYPE_APP](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_APP) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is an application.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `String` | [CONTENT_TYPE_BOOK](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_BOOK) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a book.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `String` | [CONTENT_TYPE_COMIC](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_COMIC) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a comic book.                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `String` | [CONTENT_TYPE_GAME](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_GAME) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a game.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `String` | [CONTENT_TYPE_MAGAZINE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_MAGAZINE) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a magazine.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `String` | [CONTENT_TYPE_MOVIE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_MOVIE) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a movie.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `String` | [CONTENT_TYPE_MUSIC](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_MUSIC) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a song or album.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `String` | [CONTENT_TYPE_NEWS](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_NEWS) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a news item.                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `String` | [CONTENT_TYPE_PODCAST](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_PODCAST) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a podcast.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `String` | [CONTENT_TYPE_RADIO](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_RADIO) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a radio station.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `String` | [CONTENT_TYPE_SERIAL](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_SERIAL) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is serial.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `String` | [CONTENT_TYPE_SPORTS](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_SPORTS) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is sports.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `String` | [CONTENT_TYPE_TRAILER](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_TRAILER) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a trailer.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `String` | [CONTENT_TYPE_VIDEO](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_VIDEO) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a video clip.                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `String` | [CONTENT_TYPE_WEBSITE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#CONTENT_TYPE_WEBSITE) Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a website.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `int`    | [INTENT_TYPE_ACTIVITY](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#INTENT_TYPE_ACTIVITY) Value to be used with[setContentIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentIntentData(int, android.content.Intent, int, android.os.Bundle))and[setDismissIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setDismissIntentData(int, android.content.Intent, int, android.os.Bundle))to indicate that a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for an Activity should be created when posting the recommendation to the HomeScreen.   |
| `int`    | [INTENT_TYPE_BROADCAST](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#INTENT_TYPE_BROADCAST) Value to be used with[setContentIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentIntentData(int, android.content.Intent, int, android.os.Bundle))and[setDismissIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setDismissIntentData(int, android.content.Intent, int, android.os.Bundle))to indicate that a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for a Broadcast should be created when posting the recommendation to the HomeScreen. |
| `int`    | [INTENT_TYPE_SERVICE](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#INTENT_TYPE_SERVICE) Value to be used with[setContentIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentIntentData(int, android.content.Intent, int, android.os.Bundle))and[setDismissIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setDismissIntentData(int, android.content.Intent, int, android.os.Bundle))to indicate that a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for a Service should be created when posting the recommendation to the HomeScreen.       |

|                                                                                                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                                                                                                              ||
|----------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` boolean`                                                                                                                                         | ` `[equals](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#equals(java.lang.Object))`(Object other) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` String`                                                                                                                                          | ` `[getBackgroundImageUri](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getBackgroundImageUri())`() ` Returns a Content URI that can be used to retrieve the background image for this recommendation.                                                                                                                                                                                                                                                                                                                                                              |
| ` int`                                                                                                                                             | ` `[getBadgeImageResourceId](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getBadgeImageResourceId())`() ` Returns the resource id for the recommendation badging icon.                                                                                                                                                                                                                                                                                                                                                                                              |
| ` int`                                                                                                                                             | ` `[getColor](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getColor())`() ` Returns the accent color value to be used in the UI when displaying this content recommendation to the user.                                                                                                                                                                                                                                                                                                                                                                            |
| ` `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)                                                                  | ` `[getContentImage](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getContentImage())`() ` Returns the Bitmap containing the recommendation image.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` `[ContentRecommendation.IntentData](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentData) | ` `[getContentIntent](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getContentIntent())`() ` Returns the data for the Intent that will be issued when the user clicks on the recommendation.                                                                                                                                                                                                                                                                                                                                                                         |
| ` String[]`                                                                                                                                        | ` `[getContentTypes](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getContentTypes())`() ` Returns an array containing the content types tags that describe the content.                                                                                                                                                                                                                                                                                                                                                                                             |
| ` `[ContentRecommendation.IntentData](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentData) | ` `[getDismissIntent](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getDismissIntent())`() ` Returns the data for the Intent that will be issued when the recommendation gets dismissed from the Home Screen, due to an user action.                                                                                                                                                                                                                                                                                                                                 |
| ` String[]`                                                                                                                                        | ` `[getGenres](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getGenres())`() ` Returns an array containing the genres that describe the content.                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` String`                                                                                                                                          | ` `[getGroup](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getGroup())`() ` Returns the String group ID tag for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` String`                                                                                                                                          | ` `[getIdTag](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getIdTag())`() ` Returns the String Id tag which uniquely identifies this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` String`                                                                                                                                          | ` `[getMaturityRating](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getMaturityRating())`() ` Returns the maturity level rating for the content.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[Notification](https://developer.android.com/reference/android/app/Notification.html)                                                           | ` `[getNotificationObject](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getNotificationObject(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) ` Returns a[Notification](https://developer.android.com/reference/android/app/Notification.html)object which contains the content recommendation data encapsulated by this object, which can be used for posting the recommendation via the[NotificationManager](https://developer.android.com/reference/android/app/NotificationManager.html). |
| ` String`                                                                                                                                          | ` `[getPricingType](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getPricingType())`() ` Gets the pricing type for the content.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` String`                                                                                                                                          | ` `[getPricingValue](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getPricingValue())`() ` Gets the price value (when applicable) for the content.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` String`                                                                                                                                          | ` `[getPrimaryContentType](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getPrimaryContentType())`() ` Returns the primary content type tag for the recommendation, or null if no content types have been specified.                                                                                                                                                                                                                                                                                                                                                 |
| ` int`                                                                                                                                             | ` `[getProgressMax](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getProgressMax())`() ` Returns the maximum value for the progress data of this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` int`                                                                                                                                             | ` `[getProgressValue](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getProgressValue())`() ` Returns the progress amount for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` long`                                                                                                                                            | ` `[getRunningTime](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getRunningTime())`() ` Returns the running time for the content.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` String`                                                                                                                                          | ` `[getSortKey](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getSortKey())`() ` Returns the String sort key for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` String`                                                                                                                                          | ` `[getSourceName](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getSourceName())`() ` Returns the source application name for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` int`                                                                                                                                             | ` `[getStatus](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getStatus())`() ` Returns availability status value for the content.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` String`                                                                                                                                          | ` `[getText](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getText())`() ` Returns the description text for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` String`                                                                                                                                          | ` `[getTitle](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#getTitle())`() ` Returns the content title for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` boolean`                                                                                                                                         | ` `[hasProgressInfo](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#hasProgressInfo())`() ` Indicates if this recommendation contains valid progress information.                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` int`                                                                                                                                             | ` `[hashCode](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#hashCode())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` boolean`                                                                                                                                         | ` `[isAutoDismiss](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#isAutoDismiss())`() ` Indicates whether this recommendation should be dismissed automatically.                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                                            | ` `[setAutoDismiss](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#setAutoDismiss(boolean))`(boolean autoDismiss) ` Sets the flag indicating if this recommendation should be dismissed automatically.                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                                            | ` `[setGroup](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#setGroup(java.lang.String))`(String groupTag) ` Sets the String group ID tag for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                                            | ` `[setProgress](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#setProgress(int, int))`(int max, int progress) ` Sets the progress information for the content pointed to by this recommendation.                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                                            | ` `[setSortKey](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#setSortKey(java.lang.String))`(String sortKey) ` Sets the String sort key for this recommendation.                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                                            | ` `[setStatus](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#setStatus(int))`(int status) ` Sets the availability status value for the content.                                                                                                                                                                                                                                                                                                                                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### CONTENT_MATURITY_ALL

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_MATURITY_ALL
```

Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for all audiences.

<br />

Constant Value: "android.contentMaturity.all"  

### CONTENT_MATURITY_HIGH

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_MATURITY_HIGH
```

Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for audiences of high maturity and above.

<br />

Constant Value: "android.contentMaturity.high"  

### CONTENT_MATURITY_LOW

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_MATURITY_LOW
```

Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for audiences of low maturity and above.

<br />

Constant Value: "android.contentMaturity.low"  

### CONTENT_MATURITY_MEDIUM

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_MATURITY_MEDIUM
```

Value to be used with[setMaturityRating(String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setMaturityRating(java.lang.String))to indicate that the content referred by the notification is suitable for audiences of medium maturity and above.

<br />

Constant Value: "android.contentMaturity.medium"  

### CONTENT_PRICING_FREE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_PRICING_FREE
```

Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is free to consume.

<br />

Constant Value: "android.contentPrice.free"  

### CONTENT_PRICING_PREORDER

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_PRICING_PREORDER
```

Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available currently as a pre-order, and the price value provided is the purchase price for the item.

<br />

Constant Value: "android.contentPrice.preorder"  

### CONTENT_PRICING_PURCHASE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_PRICING_PURCHASE
```

Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available for purchase, and the price value provided is the purchase price for the item.

<br />

Constant Value: "android.contentPrice.purchase"  

### CONTENT_PRICING_RENTAL

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_PRICING_RENTAL
```

Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available as a rental, and the price value provided is the rental price for the item.

<br />

Constant Value: "android.contentPrice.rental"  

### CONTENT_PRICING_SUBSCRIPTION

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_PRICING_SUBSCRIPTION
```

Value to be used with[setPricingInformation(String, String)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setPricingInformation(java.lang.String, java.lang.String))to indicate that the content referred by the notification item is available as part of a subscription based service, and the price value provided is the subscription price for the service.

<br />

Constant Value: "android.contentPrice.subscription"  

### CONTENT_STATUS_AVAILABLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int CONTENT_STATUS_AVAILABLE
```

Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is available, but needs to be first purchased, rented, subscribed or downloaded before it can be consumed.

<br />

Constant Value: 2 (0x00000002)  

### CONTENT_STATUS_PENDING

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int CONTENT_STATUS_PENDING
```

Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is pending, waiting on either a download or purchase operation to complete before it can be consumed.

<br />

Constant Value: 1 (0x00000001)  

### CONTENT_STATUS_READY

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int CONTENT_STATUS_READY
```

Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is available and ready to be consumed immediately.

<br />

Constant Value: 0 (0x00000000)  

### CONTENT_STATUS_UNAVAILABLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int CONTENT_STATUS_UNAVAILABLE
```

Value to be used with[setStatus(int)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setStatus(int))to indicate that the content referred by the notification is not available. This could be content not available in a certain region or incompatible with the device in use.

<br />

Constant Value: 3 (0x00000003)  

### CONTENT_TYPE_APP

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_APP
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is an application.

<br />

Constant Value: "android.contentType.app"  

### CONTENT_TYPE_BOOK

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_BOOK
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a book.

<br />

Constant Value: "android.contentType.book"  

### CONTENT_TYPE_COMIC

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_COMIC
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a comic book.

<br />

Constant Value: "android.contentType.comic"  

### CONTENT_TYPE_GAME

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_GAME
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a game.

<br />

Constant Value: "android.contentType.game"  

### CONTENT_TYPE_MAGAZINE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_MAGAZINE
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a magazine.

<br />

Constant Value: "android.contentType.magazine"  

### CONTENT_TYPE_MOVIE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_MOVIE
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a movie.

<br />

Constant Value: "android.contentType.movie"  

### CONTENT_TYPE_MUSIC

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_MUSIC
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a song or album.

<br />

Constant Value: "android.contentType.music"  

### CONTENT_TYPE_NEWS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_NEWS
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a news item.

<br />

Constant Value: "android.contentType.news"  

### CONTENT_TYPE_PODCAST

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_PODCAST
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a podcast.

<br />

Constant Value: "android.contentType.podcast"  

### CONTENT_TYPE_RADIO

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_RADIO
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a radio station.

<br />

Constant Value: "android.contentType.radio"  

### CONTENT_TYPE_SERIAL

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_SERIAL
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is serial. It can refer to an entire show, a single season or series, or a single episode.

<br />

Constant Value: "android.contentType.serial"  

### CONTENT_TYPE_SPORTS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_SPORTS
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is sports.

<br />

Constant Value: "android.contentType.sports"  

### CONTENT_TYPE_TRAILER

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_TRAILER
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a trailer.

<br />

Constant Value: "android.contentType.trailer"  

### CONTENT_TYPE_VIDEO

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_VIDEO
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a video clip.

<br />

Constant Value: "android.contentType.video"  

### CONTENT_TYPE_WEBSITE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CONTENT_TYPE_WEBSITE
```

Value to be used with[setContentTypes(String[])](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentTypes(java.lang.String[]))to indicate that the content referred by the notification item is a website.

<br />

Constant Value: "android.contentType.website"  

### INTENT_TYPE_ACTIVITY

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int INTENT_TYPE_ACTIVITY
```

Value to be used with[setContentIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentIntentData(int, android.content.Intent, int, android.os.Bundle))and[setDismissIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setDismissIntentData(int, android.content.Intent, int, android.os.Bundle))to indicate that a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for an Activity should be created when posting the recommendation to the HomeScreen.

<br />

Constant Value: 1 (0x00000001)  

### INTENT_TYPE_BROADCAST

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int INTENT_TYPE_BROADCAST
```

Value to be used with[setContentIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentIntentData(int, android.content.Intent, int, android.os.Bundle))and[setDismissIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setDismissIntentData(int, android.content.Intent, int, android.os.Bundle))to indicate that a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for a Broadcast should be created when posting the recommendation to the HomeScreen.

<br />

Constant Value: 2 (0x00000002)  

### INTENT_TYPE_SERVICE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int INTENT_TYPE_SERVICE
```

Value to be used with[setContentIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setContentIntentData(int, android.content.Intent, int, android.os.Bundle))and[setDismissIntentData(int, Intent, int, Bundle)](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder#setDismissIntentData(int, android.content.Intent, int, android.os.Bundle))to indicate that a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for a Service should be created when posting the recommendation to the HomeScreen.

<br />

Constant Value: 3 (0x00000003)

## Public methods

### equals

```
boolean equals (Object other)
```

<br />

<br />

|        Parameters        ||
|---------|-----------------|
| `other` | `Object` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getBackgroundImageUri

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getBackgroundImageUri ()
```

Returns a Content URI that can be used to retrieve the background image for this recommendation.

<br />

|                                     Returns                                     ||
|----------|-----------------------------------------------------------------------|
| `String` | A Content URI pointing to the recommendation background image. <br /> |

### getBadgeImageResourceId

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getBadgeImageResourceId ()
```

Returns the resource id for the recommendation badging icon.

The resource id represents the icon resource in the source application package.

<br />

|                         Returns                          ||
|-------|---------------------------------------------------|
| `int` | An integer id for the badge icon resource. <br /> |

### getColor

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getColor ()
```

Returns the accent color value to be used in the UI when displaying this content recommendation to the user.

<br />

|                                        Returns                                        ||
|-------|--------------------------------------------------------------------------------|
| `int` | An integer value representing the accent color for this recommendation. <br /> |

### getContentImage

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Bitmap getContentImage ()
```

Returns the Bitmap containing the recommendation image.

<br />

|                                                               Returns                                                                ||
|--------------------------------------------------------------------------------|------------------------------------------------------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) | A Bitmap containing the recommendation image. <br /> |

### getContentIntent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ContentRecommendation.IntentData getContentIntent ()
```

Returns the data for the Intent that will be issued when the user clicks on the recommendation.

<br />

|                                                                                                                                 Returns                                                                                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| [ContentRecommendation.IntentData](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentData) | An IntentData object, containing the data for the Intent that gets issued when the recommendation is clicked on. <br /> |

### getContentTypes

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String[] getContentTypes ()
```

Returns an array containing the content types tags that describe the content. The first tag entry is considered the primary type for the content, and is used for content ranking purposes.

<br />

|                                                            Returns                                                            ||
|------------|-------------------------------------------------------------------------------------------------------------------|
| `String[]` | An array of predefined type tags (see the`CONTENT_TYPE_*`constants) that describe the recommended content. <br /> |

### getDismissIntent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ContentRecommendation.IntentData getDismissIntent ()
```

Returns the data for the Intent that will be issued when the recommendation gets dismissed from the Home Screen, due to an user action.

<br />

|                                                                                                                                           Returns                                                                                                                                            ||
|-------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| [ContentRecommendation.IntentData](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentData) | An IntentData object, containing the data for the Intent that gets issued when the recommendation is dismissed from the Home Screen. <br /> |

### getGenres

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String[] getGenres ()
```

Returns an array containing the genres that describe the content. Genres are open ended String tags.

<br />

|                                     Returns                                      ||
|------------|----------------------------------------------------------------------|
| `String[]` | An array of genre tags that describe the recommended content. <br /> |

### getGroup

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getGroup ()
```

Returns the String group ID tag for this recommendation.

<br />

|                                    Returns                                     ||
|----------|----------------------------------------------------------------------|
| `String` | A String containing the group ID tag for this recommendation. <br /> |

### getIdTag

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getIdTag ()
```

Returns the String Id tag which uniquely identifies this recommendation.

<br />

|                           Returns                           ||
|----------|---------------------------------------------------|
| `String` | The String Id tag for this recommendation. <br /> |

### getMaturityRating

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getMaturityRating ()
```

Returns the maturity level rating for the content.

<br />

|                                                                Returns                                                                 ||
|----------|------------------------------------------------------------------------------------------------------------------------------|
| `String` | returns a predefined tag indicating the maturity level rating for the content (see the`CONTENT_MATURITY_*`constants). <br /> |

### getNotificationObject

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Notification getNotificationObject (Context context)
```

Returns a[Notification](https://developer.android.com/reference/android/app/Notification.html)object which contains the content recommendation data encapsulated by this object, which can be used for posting the recommendation via the[NotificationManager](https://developer.android.com/reference/android/app/NotificationManager.html).

<br />

|                                                                                                                                      Parameters                                                                                                                                      ||
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: A[Context](https://developer.android.com/reference/android/content/Context.html)that will be used to construct the[Notification](https://developer.android.com/reference/android/app/Notification.html)object which will carry the recommendation data. <br /> |

|                                                                                                            Returns                                                                                                             ||
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| [Notification](https://developer.android.com/reference/android/app/Notification.html) | A[Notification](https://developer.android.com/reference/android/app/Notification.html)containing the stored recommendation data. <br /> |

### getPricingType

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getPricingType ()
```

Gets the pricing type for the content.

<br />

|                                                        Returns                                                        ||
|----------|-------------------------------------------------------------------------------------------------------------|
| `String` | A predefined tag indicating the pricing type for the content (see the` CONTENT_PRICING_*`constants). <br /> |

### getPricingValue

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getPricingValue ()
```

Gets the price value (when applicable) for the content. The value will be provided as a String containing the price in the appropriate currency for the current locale.

<br />

|                                                    Returns                                                     ||
|----------|------------------------------------------------------------------------------------------------------|
| `String` | A string containing a representation of the content price in the current locale and currency. <br /> |

### getPrimaryContentType

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getPrimaryContentType ()
```

Returns the primary content type tag for the recommendation, or null if no content types have been specified.

<br />

|                                                                Returns                                                                ||
|----------|-----------------------------------------------------------------------------------------------------------------------------|
| `String` | A predefined type tag (see the`CONTENT_TYPE_*`constants) indicating the primary content type for the recommendation. <br /> |

### getProgressMax

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getProgressMax ()
```

Returns the maximum value for the progress data of this recommendation.

<br />

|                              Returns                              ||
|-------|------------------------------------------------------------|
| `int` | An integer representing the maximum progress value. <br /> |

### getProgressValue

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getProgressValue ()
```

Returns the progress amount for this recommendation.

<br />

|                                  Returns                                  ||
|-------|--------------------------------------------------------------------|
| `int` | An integer representing the recommendation progress amount. <br /> |

### getRunningTime

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
long getRunningTime ()
```

Returns the running time for the content.

<br />

|                                           Returns                                           ||
|--------|-------------------------------------------------------------------------------------|
| `long` | The run length, in seconds, of the content associated with the notification. <br /> |

### getSortKey

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getSortKey ()
```

Returns the String sort key for this recommendation.

<br />

|                                  Returns                                   ||
|----------|------------------------------------------------------------------|
| `String` | A String containing the sort key for this recommendation. <br /> |

### getSourceName

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getSourceName ()
```

Returns the source application name for this recommendation.

<br />

|                               Returns                                ||
|----------|------------------------------------------------------------|
| `String` | A String containing the recommendation source name. <br /> |

### getStatus

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getStatus ()
```

Returns availability status value for the content. This status indicates whether the content is ready to be consumed on the device, or if the user must first purchase, rent, subscribe to, or download the content.

<br />

|                                                                             Returns                                                                              ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | The status value for the content, or -1 is a valid status has not been specified (see the`CONTENT_STATUS_*`constants for the valid status values). <br /> |

### getText

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getText ()
```

Returns the description text for this recommendation.

<br />

|                                  Returns                                  ||
|----------|-----------------------------------------------------------------|
| `String` | A String containing the recommendation description text. <br /> |

### getTitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getTitle ()
```

Returns the content title for this recommendation.

<br />

|                                Returns                                 ||
|----------|--------------------------------------------------------------|
| `String` | A String containing the recommendation content title. <br /> |

### hasProgressInfo

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean hasProgressInfo ()
```

Indicates if this recommendation contains valid progress information.

<br />

|                                           Returns                                           ||
|-----------|----------------------------------------------------------------------------------|
| `boolean` | true if the recommendation contains valid progress data, false otherwise. <br /> |

### hashCode

```
int hashCode ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### isAutoDismiss

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isAutoDismiss ()
```

Indicates whether this recommendation should be dismissed automatically.

Auto-dismiss notifications are automatically removed from the Home Screen when the user clicks on them.

<br />

|                                            Returns                                             ||
|-----------|-------------------------------------------------------------------------------------|
| `boolean` | true if the recommendation is marked for auto dismissal, or false otherwise. <br /> |

### setAutoDismiss

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setAutoDismiss (boolean autoDismiss)
```

Sets the flag indicating if this recommendation should be dismissed automatically.

Auto-dismiss notifications are automatically removed from the Home Screen when the user clicks on them.

<br />

|                                                  Parameters                                                  ||
|---------------|-----------------------------------------------------------------------------------------------|
| `autoDismiss` | `boolean`: A boolean indicating if the recommendation should be auto dismissed or not. <br /> |

### setGroup

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setGroup (String groupTag)
```

Sets the String group ID tag for this recommendation.

Recommendations in the same group are ranked by the Home Screen together, and the sort order within a group is respected. This can be useful if the application has different sources for recommendations, like "trending", "subscriptions", and "new music" categories for YouTube, where the user can be more interested in recommendations from one group than another.

<br />

|                                         Parameters                                         ||
|------------|--------------------------------------------------------------------------------|
| `groupTag` | `String`: A String containing the group ID tag for this recommendation. <br /> |

### setProgress

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setProgress (int max, 
                int progress)
```

Sets the progress information for the content pointed to by this recommendation.

<br />

|                                           Parameters                                            ||
|------------|-------------------------------------------------------------------------------------|
| `max`      | `int`: The maximum value for the progress of this content. <br />                   |
| `progress` | `int`: The progress amount for this content. Must be in the range (0 - max). <br /> |

### setSortKey

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSortKey (String sortKey)
```

Sets the String sort key for this recommendation.

The sort key must be a String representation of a float number between 0.0 and 1.0, and is used to indicate the relative importance (and sort order) of a single recommendation within its specified group. The recommendations will be ordered in decreasing order of importance within a given group.

<br />

|                                      Parameters                                       ||
|-----------|----------------------------------------------------------------------------|
| `sortKey` | `String`: A String containing the sort key for this recommendation. <br /> |

### setStatus

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStatus (int status)
```

Sets the availability status value for the content. This status indicates whether the content is ready to be consumed on the device, or if the user must first purchase, rent, subscribe to, or download the content.

<br />

|                                                    Parameters                                                     ||
|----------|---------------------------------------------------------------------------------------------------------|
| `status` | `int`: The status value for the content. (see the`CONTENT_STATUS_*`for the valid status values). <br /> |

-

  ## Annotations

  - [ContentRecommendation.ContentMaturity](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentMaturity)
  - [ContentRecommendation.ContentPricing](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentPricing)
  - [ContentRecommendation.ContentStatus](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentStatus)
  - [ContentRecommendation.ContentType](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.ContentType)
  - [ContentRecommendation.IntentType](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentType)
-

  ## Classes

  - [ContentRecommendation](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation)
  - [ContentRecommendation.Builder](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.Builder)
  - [ContentRecommendation.IntentData](https://developer.android.com/reference/android/support/app/recommendation/ContentRecommendation.IntentData)
  - [RecommendationExtender](https://developer.android.com/reference/android/support/app/recommendation/RecommendationExtender)