belongs to Maven artifact com.android.support:recommendation:28.0.0-alpha1
ContentRecommendation
public
final
class
ContentRecommendation
extends Object
java.lang.Object | |
↳ | android.support.app.recommendation.ContentRecommendation |
The ContentRecommendation object encapsulates all application provided data for a single content recommendation item.
Summary
Nested classes | |
---|---|
class |
ContentRecommendation.Builder
Builder class for |
@interface |
ContentRecommendation.ContentMaturity
|
@interface |
ContentRecommendation.ContentPricing
|
@interface |
ContentRecommendation.ContentStatus
|
@interface |
ContentRecommendation.ContentType
|
class |
ContentRecommendation.IntentData
Object used to encapsulate the data to be used to build the |
@interface |
ContentRecommendation.IntentType
|
Constants | |
---|---|
String |
CONTENT_MATURITY_ALL
Value to be used with |
String |
CONTENT_MATURITY_HIGH
Value to be used with |
String |
CONTENT_MATURITY_LOW
Value to be used with |
String |
CONTENT_MATURITY_MEDIUM
Value to be used with |
String |
CONTENT_PRICING_FREE
Value to be used with |
String |
CONTENT_PRICING_PREORDER
Value to be used with |
String |
CONTENT_PRICING_PURCHASE
Value to be used with |
String |
CONTENT_PRICING_RENTAL
Value to be used with |
String |
CONTENT_PRICING_SUBSCRIPTION
Value to be used with |
int |
CONTENT_STATUS_AVAILABLE
Value to be used with |
int |
CONTENT_STATUS_PENDING
Value to be used with |
int |
CONTENT_STATUS_READY
Value to be used with |
int |
CONTENT_STATUS_UNAVAILABLE
Value to be used with |
String |
CONTENT_TYPE_APP
Value to be used with |
String |
CONTENT_TYPE_BOOK
Value to be used with |
String |
CONTENT_TYPE_COMIC
Value to be used with |
String |
CONTENT_TYPE_GAME
Value to be used with |
String |
CONTENT_TYPE_MAGAZINE
Value to be used with |
String |
CONTENT_TYPE_MOVIE
Value to be used with |
String |
CONTENT_TYPE_MUSIC
Value to be used with |
String |
CONTENT_TYPE_NEWS
Value to be used with |
String |
CONTENT_TYPE_PODCAST
Value to be used with |
String |
CONTENT_TYPE_RADIO
Value to be used with |
String |
CONTENT_TYPE_SERIAL
Value to be used with |
String |
CONTENT_TYPE_SPORTS
Value to be used with |
String |
CONTENT_TYPE_TRAILER
Value to be used with |
String |
CONTENT_TYPE_VIDEO
Value to be used with |
String |
CONTENT_TYPE_WEBSITE
Value to be used with |
int |
INTENT_TYPE_ACTIVITY
Value to be used with |
int |
INTENT_TYPE_BROADCAST
Value to be used with |
int |
INTENT_TYPE_SERVICE
Value to be used with |
Public methods | |
---|---|
boolean
|
equals(Object other)
|
String
|
getBackgroundImageUri()
Returns a Content URI that can be used to retrieve the background image for this recommendation. |
int
|
getBadgeImageResourceId()
Returns the resource id for the recommendation badging icon. |
int
|
getColor()
Returns the accent color value to be used in the UI when displaying this content recommendation to the user. |
Bitmap
|
getContentImage()
Returns the Bitmap containing the recommendation image. |
ContentRecommendation.IntentData
|
getContentIntent()
Returns the data for the Intent that will be issued when the user clicks on the recommendation. |
String[]
|
getContentTypes()
Returns an array containing the content types tags that describe the content. |
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. |
String[]
|
getGenres()
Returns an array containing the genres that describe the content. |
String
|
getGroup()
Returns the String group ID tag for this recommendation. |
String
|
getIdTag()
Returns the String Id tag which uniquely identifies this recommendation. |
String
|
getMaturityRating()
Returns the maturity level rating for the content. |
Notification
|
getNotificationObject(Context context)
Returns a |
String
|
getPricingType()
Gets the pricing type for the content. |
String
|
getPricingValue()
Gets the price value (when applicable) for the content. |
String
|
getPrimaryContentType()
Returns the primary content type tag for the recommendation, or null if no content types have been specified. |
int
|
getProgressMax()
Returns the maximum value for the progress data of this recommendation. |
int
|
getProgressValue()
Returns the progress amount for this recommendation. |
long
|
getRunningTime()
Returns the running time for the content. |
String
|
getSortKey()
Returns the String sort key for this recommendation. |
String
|
getSourceName()
Returns the source application name for this recommendation. |
int
|
getStatus()
Returns availability status value for the content. |
String
|
getText()
Returns the description text for this recommendation. |
String
|
getTitle()
Returns the content title for this recommendation. |
boolean
|
hasProgressInfo()
Indicates if this recommendation contains valid progress information. |
int
|
hashCode()
|
boolean
|
isAutoDismiss()
Indicates whether this recommendation should be dismissed automatically. |
void
|
setAutoDismiss(boolean autoDismiss)
Sets the flag indicating if this recommendation should be dismissed automatically. |
void
|
setGroup(String groupTag)
Sets the String group ID tag for this recommendation. |
void
|
setProgress(int max, int progress)
Sets the progress information for the content pointed to by this recommendation. |
void
|
setSortKey(String sortKey)
Sets the String sort key for this recommendation. |
void
|
setStatus(int status)
Sets the availability status value for the content. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Constants
CONTENT_MATURITY_ALL
String CONTENT_MATURITY_ALL
Value to be used with setMaturityRating(String)
to indicate that the content referred
by the notification is suitable for all audiences.
Constant Value: "android.contentMaturity.all"
CONTENT_MATURITY_HIGH
String CONTENT_MATURITY_HIGH
Value to be used with setMaturityRating(String)
to indicate that the content referred
by the notification is suitable for audiences of high maturity and above.
Constant Value: "android.contentMaturity.high"
CONTENT_MATURITY_LOW
String CONTENT_MATURITY_LOW
Value to be used with setMaturityRating(String)
to indicate that the content referred
by the notification is suitable for audiences of low maturity and above.
Constant Value: "android.contentMaturity.low"
CONTENT_MATURITY_MEDIUM
String CONTENT_MATURITY_MEDIUM
Value to be used with setMaturityRating(String)
to indicate that the content referred
by the notification is suitable for audiences of medium maturity and above.
Constant Value: "android.contentMaturity.medium"
CONTENT_PRICING_FREE
String CONTENT_PRICING_FREE
Value to be used with setPricingInformation(String, String)
to indicate that the content
referred by the notification item is free to consume.
Constant Value: "android.contentPrice.free"
CONTENT_PRICING_PREORDER
String CONTENT_PRICING_PREORDER
Value to be used with setPricingInformation(String, 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.
Constant Value: "android.contentPrice.preorder"
CONTENT_PRICING_PURCHASE
String CONTENT_PRICING_PURCHASE
Value to be used with setPricingInformation(String, 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.
Constant Value: "android.contentPrice.purchase"
CONTENT_PRICING_RENTAL
String CONTENT_PRICING_RENTAL
Value to be used with setPricingInformation(String, 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.
Constant Value: "android.contentPrice.rental"
CONTENT_PRICING_SUBSCRIPTION
String CONTENT_PRICING_SUBSCRIPTION
Value to be used with setPricingInformation(String, 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.
Constant Value: "android.contentPrice.subscription"
CONTENT_STATUS_AVAILABLE
int CONTENT_STATUS_AVAILABLE
Value to be used with 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.
Constant Value: 2 (0x00000002)
CONTENT_STATUS_PENDING
int CONTENT_STATUS_PENDING
Value to be used with 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.
Constant Value: 1 (0x00000001)
CONTENT_STATUS_READY
int CONTENT_STATUS_READY
Value to be used with setStatus(int)
to indicate that the content referred by the
notification is available and ready to be consumed immediately.
Constant Value: 0 (0x00000000)
CONTENT_STATUS_UNAVAILABLE
int CONTENT_STATUS_UNAVAILABLE
Value to be used with 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.
Constant Value: 3 (0x00000003)
CONTENT_TYPE_APP
String CONTENT_TYPE_APP
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is an application.
Constant Value: "android.contentType.app"
CONTENT_TYPE_BOOK
String CONTENT_TYPE_BOOK
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a book.
Constant Value: "android.contentType.book"
CONTENT_TYPE_COMIC
String CONTENT_TYPE_COMIC
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a comic book.
Constant Value: "android.contentType.comic"
CONTENT_TYPE_GAME
String CONTENT_TYPE_GAME
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a game.
Constant Value: "android.contentType.game"
CONTENT_TYPE_MAGAZINE
String CONTENT_TYPE_MAGAZINE
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a magazine.
Constant Value: "android.contentType.magazine"
CONTENT_TYPE_MOVIE
String CONTENT_TYPE_MOVIE
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a movie.
Constant Value: "android.contentType.movie"
CONTENT_TYPE_MUSIC
String CONTENT_TYPE_MUSIC
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a song or album.
Constant Value: "android.contentType.music"
CONTENT_TYPE_NEWS
String CONTENT_TYPE_NEWS
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a news item.
Constant Value: "android.contentType.news"
CONTENT_TYPE_PODCAST
String CONTENT_TYPE_PODCAST
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a podcast.
Constant Value: "android.contentType.podcast"
CONTENT_TYPE_RADIO
String CONTENT_TYPE_RADIO
Value to be used with setContentTypes(String[])
to indicate that the conte