public class NotificationOptions extends Object implements Parcelable
Notification
. Set this as the value of
StraasMediaCore.KEY_NOTIFICATION_OPTIONS
.StraasMediaCore.KEY_NOTIFICATION_OPTIONS
Modifier and Type | Class and Description |
---|---|
static class |
NotificationOptions.Builder
Builder of
NotificationOptions . |
static interface |
NotificationOptions.NOTIFICATION_ACTIONS
This indicates the actions that can be used in
NotificationOptions.Builder.setActions(List, int[]) . |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_CLEAR
This action will trigger
stop() and clear current
Notification . |
static String |
ACTION_NEXT
This action will trigger
skipToNext() . |
static String |
ACTION_PREV
This action will trigger
skipToPrevious() . |
static String |
ACTION_TOGGLE_PLAYBACK
|
static Parcelable.Creator<NotificationOptions> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
protected |
NotificationOptions(Parcel in) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
List<String> |
getActions()
Returns the list of actions to show in the
Notification . |
NotificationChannel |
getChannel()
Returns the
NotificationChannel that will be set to this Notification . |
int |
getClearDrawableResId()
Returns the resource ID of the icon that indicates
ACTION_CLEAR . |
int |
getColor()
Returns the color that will be use to build the
Notification . |
int[] |
getCompatActionIndices()
Returns a copy of the indices of the actions which should be shown in the compact form of
the notification.
|
Bitmap |
getLargeIcon()
Returns the bitmap of the large icon that will be used to build the
Notification . |
int |
getPauseDrawableResId()
Returns the resource ID of the icon that indicates "pause".
|
int |
getPlayDrawableResId()
Returns the resource ID of the icon that indicates "play".
|
int |
getSkipNextDrawableResId()
Returns the resource ID of the icon that indicates
ACTION_NEXT . |
int |
getSkipPrevDrawableResId()
Returns the resource ID of the icon that indicates
ACTION_PREV . |
int |
getSmallIcon()
Returns the resource ID of the small icon that will be used to build the
Notification . |
String |
getTargetClassName()
Returns the name of the
Activity that will be launched when user clicks the content
area of the Notification . |
void |
writeToParcel(Parcel dest,
int flags) |
public static final String ACTION_TOGGLE_PLAYBACK
public static final String ACTION_PREV
skipToPrevious()
.public static final String ACTION_NEXT
skipToNext()
.public static final String ACTION_CLEAR
stop()
and clear current
Notification
.public static final Parcelable.Creator<NotificationOptions> CREATOR
protected NotificationOptions(Parcel in)
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
public int describeContents()
describeContents
in interface Parcelable
public List<String> getActions()
Notification
.NotificationOptions.Builder.setActions(List, int[])
public int[] getCompatActionIndices()
NotificationOptions.Builder.setActions(List, int[])
public int getPauseDrawableResId()
NotificationOptions.Builder.setPauseDrawableResId(int)
@DrawableRes public int getPlayDrawableResId()
NotificationOptions.Builder.setPlayDrawableResId(int)
public int getSkipPrevDrawableResId()
ACTION_PREV
.NotificationOptions.Builder.setSkipPrevDrawableResId(int)
public int getSkipNextDrawableResId()
ACTION_NEXT
.NotificationOptions.Builder.setSkipNextDrawableResId(int)
public int getClearDrawableResId()
ACTION_CLEAR
.NotificationOptions.Builder.setClearDrawableResId(int)
public int getSmallIcon()
Notification
.NotificationOptions.Builder.setSmallIconResId(int)
public Bitmap getLargeIcon()
Notification
.NotificationOptions.Builder.setLargeIcon(Bitmap)
public int getColor()
Notification
.ColorInt
NotificationOptions.Builder.setColor(int)
public String getTargetClassName()
Activity
that will be launched when user clicks the content
area of the Notification
.Activity
NotificationOptions.Builder.setTargetClassName(String)
public NotificationChannel getChannel()
NotificationChannel
that will be set to this Notification
.NotificationChannel
NotificationOptions.Builder.setChannel(NotificationChannel)