java.lang.Object | |
↳ | android.support.app.recommendation.ContentRecommendation |
The ContentRecommendation object encapsulates all application provided data for a single content recommendation item.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ContentRecommendation.Builder |
Builder class for ContentRecommendation objects.
|
||||||||||
ContentRecommendation.ContentMaturity | |||||||||||
ContentRecommendation.ContentPricing | |||||||||||
ContentRecommendation.ContentStatus | |||||||||||
ContentRecommendation.ContentType | |||||||||||
ContentRecommendation.IntentData |
Object used to encapsulate the data to be used to build the PendingIntent object
associated with a given content recommendation, at the time this recommendation gets posted
to the home Screen.
|
||||||||||
ContentRecommendation.IntentType |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
int | CONTENT_STATUS_UNAVAILABLE |
Value to be used with setStatus(int) to indicate that the content referred by the
notification is not available.
|
|||||||||
String | CONTENT_TYPE_APP |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is an application.
|
|||||||||
String | CONTENT_TYPE_BOOK |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a book.
|
|||||||||
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.
|
|||||||||
String | CONTENT_TYPE_GAME |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a game.
|
|||||||||
String | CONTENT_TYPE_MAGAZINE |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a magazine.
|
|||||||||
String | CONTENT_TYPE_MOVIE |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a movie.
|
|||||||||
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.
|
|||||||||
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.
|
|||||||||
String | CONTENT_TYPE_PODCAST |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a podcast.
|
|||||||||
String | CONTENT_TYPE_RADIO |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a radio station.
|
|||||||||
String | CONTENT_TYPE_SERIAL |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is serial.
|
|||||||||
String | CONTENT_TYPE_SPORTS |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is sports.
|
|||||||||
String | CONTENT_TYPE_TRAILER |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a trailer.
|
|||||||||
String | CONTENT_TYPE_VIDEO |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a video clip.
|
|||||||||
String | CONTENT_TYPE_WEBSITE |
Value to be used with setContentTypes(String[]) to indicate that the content referred
by the notification item is a website.
|
|||||||||
int | INTENT_TYPE_ACTIVITY |
Value to be used with setContentIntentData(int, Intent, int, Bundle) and
setDismissIntentData(int, Intent, int, Bundle) to indicate that a PendingIntent for an Activity
should be created when posting the recommendation to the HomeScreen.
|
|||||||||
int | INTENT_TYPE_BROADCAST |
Value to be used with setContentIntentData(int, Intent, int, Bundle) and
setDismissIntentData(int, Intent, int, Bundle) to indicate that a PendingIntent for a Broadcast
should be created when posting the recommendation to the HomeScreen.
|
|||||||||
int | INTENT_TYPE_SERVICE |
Value to be used with setContentIntentData(int, Intent, int, Bundle) and
setDismissIntentData(int, Intent, int, Bundle) to indicate that a PendingIntent for a Service
should be created when posting the recommendation to the HomeScreen.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares this instance with the specified object and indicates if they
are equal.
| |||||||||||
Returns a Content URI that can be used to retrieve the background image for this
recommendation.
| |||||||||||
Returns the resource id for the recommendation badging icon.
| |||||||||||
Returns the accent color value to be used in the UI when displaying this content
recommendation to the user.
| |||||||||||
Returns the Bitmap containing the recommendation image.
| |||||||||||
Returns the data for the Intent that will be issued when the user clicks on the
recommendation.
| |||||||||||
Returns an array containing the content types tags that describe the content.
| |||||||||||
Returns the data for the Intent that will be issued when the recommendation gets dismissed
from the Home Screen, due to an user action.
| |||||||||||
Returns an array containing the genres that describe the content.
| |||||||||||
Returns the String group ID tag for this recommendation.
| |||||||||||
Returns the String Id tag which uniquely identifies this recommendation.
| |||||||||||
Returns the maturity level rating for the content.
| |||||||||||
Returns a
Notification object which contains the content
recommendation data encapsulated by this object, which can be used for posting the
recommendation via the NotificationManager .
| |||||||||||
Gets the pricing type for the content.
| |||||||||||
Gets the price value (when applicable) for the content.
| |||||||||||
Returns the primary content type tag for the recommendation, or null if no content types have
been specified.
| |||||||||||
Returns the maximum value for the progress data of this recommendation.
| |||||||||||
Returns the progress amount for this recommendation.
| |||||||||||
Returns the running time for the content.
| |||||||||||
Returns the String sort key for this recommendation.
| |||||||||||
Returns the source application name for this recommendation.
| |||||||||||
Returns availability status value for the content.
| |||||||||||
Returns the description text for this recommendation.
| |||||||||||
Returns the content title for this recommendation.
| |||||||||||
Indicates if this recommendation contains valid progress information.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Indicates whether this recommendation should be dismissed automatically.
| |||||||||||
Sets the flag indicating if this recommendation should be dismissed automatically.
| |||||||||||
Sets the String group ID tag for this recommendation.
| |||||||||||
Sets the progress information for the content pointed to by this recommendation.
| |||||||||||
Sets the String sort key for this recommendation.
| |||||||||||
Sets the availability status value for the content.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Value to be used with setMaturityRating(String)
to indicate that the content referred
by the notification is suitable for all audiences.
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.
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.
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.
Value to be used with setPricingInformation(String, String)
to indicate that the content
referred by the notification item is free to consume.
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.
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.
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.
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.
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.
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.
Value to be used with setStatus(int)
to indicate that the content referred by the
notification is available and ready to be consumed immediately.
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.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is an application.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a book.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a comic book.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a game.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a magazine.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a movie.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a song or album.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a news item.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a podcast.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a radio station.
Value to be used with setContentTypes(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.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is sports.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a trailer.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a video clip.
Value to be used with setContentTypes(String[])
to indicate that the content referred
by the notification item is a website.
Value to be used with setContentIntentData(int, Intent, int, Bundle)
and
setDismissIntentData(int, Intent, int, Bundle)
to indicate that a PendingIntent
for an Activity
should be created when posting the recommendation to the HomeScreen.
Value to be used with setContentIntentData(int, Intent, int, Bundle)
and
setDismissIntentData(int, Intent, int, Bundle)
to indicate that a PendingIntent
for a Broadcast
should be created when posting the recommendation to the HomeScreen.
Value to be used with setContentIntentData(int, Intent, int, Bundle)
and
setDismissIntentData(int, Intent, int, Bundle)
to indicate that a PendingIntent
for a Service
should be created when posting the recommendation to the HomeScreen.
Compares this instance with the specified object and indicates if they
are equal. In order to be equal, o
must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true
only if this ==
o
. See Writing a correct
equals
method
if you intend implementing your own equals
method.
The general contract for the equals
and hashCode()
methods is that if equals
returns true
for
any two objects, then hashCode()
must return the same value for
these objects. This means that subclasses of Object
usually
override either both methods or neither of them.
other | the object to compare this instance with. |
---|
true
if the specified object is equal to this Object
; false
otherwise.Returns a Content URI that can be used to retrieve the background image for this recommendation.
Returns the resource id for the recommendation badging icon.
The resource id represents the icon resource in the source application package.
Returns the accent color value to be used in the UI when displaying this content recommendation to the user.
Returns the Bitmap containing the recommendation image.
Returns the data for the Intent that will be issued when the user clicks on the recommendation.
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.
CONTENT_TYPE_*
constants) that
describe the recommended content.
Returns the data for the Intent that will be issued when the recommendation gets dismissed from the Home Screen, due to an user action.
Returns an array containing the genres that describe the content. Genres are open ended String tags.
Returns the String group ID tag for this recommendation.
Returns the String Id tag which uniquely identifies this recommendation.
Returns the maturity level rating for the content.
CONTENT_MATURITY_*
constants).
Returns a Notification
object which contains the content
recommendation data encapsulated by this object, which can be used for posting the
recommendation via the NotificationManager
.
context | A Context that will be used to construct the
Notification object which will carry the
recommendation data. |
---|
Notification
containing the stored recommendation
data.
Gets the pricing type for the content.
CONTENT_PRICING_*
constants).
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.
Returns the primary content type tag for the recommendation, or null if no content types have been specified.
CONTENT_TYPE_*
constants) indicating the
primary content type for the recommendation.
Returns the maximum value for the progress data of this recommendation.
Returns the progress amount for this recommendation.
Returns the running time for the content.
Returns the String sort key for this recommendation.
Returns the source application name for this recommendation.
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.
CONTENT_STATUS_*
constants for the valid status values).
Returns the description text for this recommendation.
Returns the content title for this recommendation.
Indicates if this recommendation contains valid progress information.
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
Indicates whether this recommendation should be dismissed automatically.
Auto-dismiss notifications are automatically removed from the Home Screen when the user clicks on them.
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.
autoDismiss | A boolean indicating if the recommendation should be auto dismissed or not. |
---|
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.
groupTag | A String containing the group ID tag for this recommendation. |
---|
Sets the progress information for the content pointed to by this recommendation.
max | The maximum value for the progress of this content. |
---|---|
progress | The progress amount for this content. Must be in the range (0 - max). |
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.
sortKey | A String containing the sort key for this recommendation. |
---|
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.
status | The status value for the content. (see the CONTENT_STATUS_* for
the valid status values).
|
---|