belongs to Maven artifact com.android.support:recommendation:28.0.0-alpha1
RecommendationExtender
public
final
class
RecommendationExtender
extends Object
implements
Notification.Extender
java.lang.Object | |
↳ | android.support.app.recommendation.RecommendationExtender |
Helper class to add content info extensions to notifications. To create a notification with content info extensions:
- Create an
Notification.CarExtender.Builder
, setting any desired properties. - Create a
RecommendationExtender
. - Set content info specific properties using the
add
andset
methods ofRecommendationExtender
. - Call
Notification.Builder.extend(Notification.Extender)
to apply the extensions to a notification.
Notification notification = new Notification.Builder(context) * ... * .extend(new RecommendationExtender() * .set*(...)) * .build(); *
Content info extensions can be accessed on an existing notification by using the
RecommendationExtender(Notification)
constructor, and then using the get
methods
to access values.
Summary
Public constructors | |
---|---|
RecommendationExtender()
Create a |
|
RecommendationExtender(Notification notif)
Create a |
Public methods | |
---|---|
Notification.Builder
|
extend(Notification.Builder builder)
Apply content extensions to a notification that is being built. |
String[]
|
getContentTypes()
Returns an array containing the content types that describe the content associated with the notification. |
String[]
|
getGenres()
Returns an array containing the content genres that describe the content associated with the notification. |
String
|
getMaturityRating()
Returns the maturity level rating for the content associated with the notification. |
String
|
getPricingType()
Gets the pricing type for the content associated with the notification. |
String
|
getPricingValue()
Gets the price value (when applicable) for the content associated with a notification. |
String
|
getPrimaryContentType()
Returns the primary content type tag for the content associated with the notification. |
long
|
getRunningTime()
Returns the running time for the content associated with the notification. |
int
|
getStatus()
Returns status value for the content associated with the notification. |
RecommendationExtender
|
setContentTypes(String[] types)
Sets the content types associated with the notification content. |
RecommendationExtender
|
setGenres(String[] genres)
Sets the content genres associated with the notification content. |
RecommendationExtender
|
setMaturityRating(String maturityRating)
Sets the maturity level rating for the content associated with the notification. |
RecommendationExtender
|
setPricingInformation(String priceType, String priceValue)
Sets the pricing and availability information for the content associated with the notification. |
RecommendationExtender
|
setRunningTime(long length)
Sets the running time (when applicable) for the content associated with the notification. |
RecommendationExtender
|
setStatus(int contentStatus)
Sets the availability status for the content associated with the notification. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|