NotificationOptions

public class NotificationOptions extends Object
implements Parcelable

Configuration parameters for building the media notification. The NotificationOptions.Builder is used to create an instance of NotificationOptions, and so contains the corresponding setter methods.

Nested Class Summary

class NotificationOptions.Builder A builder for creating an instance of NotificationOptions

Constant Summary

long SKIP_STEP_TEN_SECONDS_IN_MS Constant for notification skip step, ten seconds in milliseconds.
long SKIP_STEP_THIRTY_SECONDS_IN_MS Constant for notification skip step, thirty seconds in milliseconds.

Inherited Constant Summary

Public Method Summary

List<String>
getActions()
Returns the list of actions to show in the notification.
int
getCastingToDeviceStringResId()
Returns the resource ID of the "Casting to" format string, used as the subtitle in the notification.
int[]
getCompatActionIndices()
Returns a copy of the indices of the actions which should be shown in the compact form of the notification.
int
getDisconnectDrawableResId()
Returns the resource ID of the icon that indicates a "disconnect" button.
int
getForward10DrawableResId()
Returns the resource ID of the icon that indicates a "skip forward 10 seconds" button.
int
getForward30DrawableResId()
Returns the resource ID of the icon that indicates a "skip forward 30 seconds" button.
int
getForwardDrawableResId()
Returns the resource ID of the icon that indicates a "skip forward" button.
int
getPauseDrawableResId()
Returns the resource ID of the icon that indicates a "pause" button.
int
getPlayDrawableResId()
Returns the resource ID of the icon that indicates a "play" button.
int
getRewind10DrawableResId()
Returns the resource ID of the icon that indicates a "rewind 10 seconds" button.
int
getRewind30DrawableResId()
Returns the resource ID of the icon that indicates a "rewind 30 seconds" button.
int
getRewindDrawableResId()
Returns the resource ID of the icon that indicates a "rewind" button.
int
getSkipNextDrawableResId()
Returns the resource ID of the icon that indicates a "skip next" button.
int
getSkipPrevDrawableResId()
Returns the resource ID of the icon that indicates a "skip previous" button.
long
getSkipStepMs()
Returns the amount to jump if MediaIntentReceiver.ACTION_FORWARD or MediaIntentReceiver.ACTION_REWIND are included in the notification actions.
int
getSmallIconDrawableResId()
Returns the resource ID of the small icon that will be used to build the notification.
int
getStopLiveStreamDrawableResId()
Returns the resource ID of the icon that indicates a "stop playing live stream" button.
int
getStopLiveStreamTitleResId()
Returns the resource ID of the label for the "Stop live stream" button.
String
getTargetActivityClassName()
Returns the name of the Activity that will be launched when user taps on the content area of the notification.
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

Constants

public static final long SKIP_STEP_TEN_SECONDS_IN_MS

Constant for notification skip step, ten seconds in milliseconds.

Constant Value: 10000

public static final long SKIP_STEP_THIRTY_SECONDS_IN_MS

Constant for notification skip step, thirty seconds in milliseconds.

Constant Value: 30000

Public Methods

public List<String> getActions ()

Returns the list of actions to show in the notification.

public int getCastingToDeviceStringResId ()

Returns the resource ID of the "Casting to" format string, used as the subtitle in the notification.

public int[] getCompatActionIndices ()

Returns a copy of the indices of the actions which should be shown in the compact form of the notification.

public int getDisconnectDrawableResId ()

Returns the resource ID of the icon that indicates a "disconnect" button. You can override the alias drawable ic_notification_disconnect.xml to specify your own icon.

public int getForward10DrawableResId ()

Returns the resource ID of the icon that indicates a "skip forward 10 seconds" button. You can override the alias drawable ic_notification_forward10.xml to specify your own icon.

public int getForward30DrawableResId ()

Returns the resource ID of the icon that indicates a "skip forward 30 seconds" button. You can override the alias drawable ic_notification_forward30.xml to specify your own icon.

public int getForwardDrawableResId ()

Returns the resource ID of the icon that indicates a "skip forward" button. You can override the alias drawable ic_notification_forward.xml to specify your own icon.

public int getPauseDrawableResId ()

Returns the resource ID of the icon that indicates a "pause" button. You can override the alias drawable ic_notification_pause.xml to specify your own icon.

public int getPlayDrawableResId ()

Returns the resource ID of the icon that indicates a "play" button. You can override the alias drawable ic_notification_play.xml to specify your own icon.

public int getRewind10DrawableResId ()

Returns the resource ID of the icon that indicates a "rewind 10 seconds" button. You can override the alias drawable ic_notification_rewind10.xml to specify your own icon.

public int getRewind30DrawableResId ()

Returns the resource ID of the icon that indicates a "rewind 30 seconds" button. You can override the alias drawable ic_notification_rewind30.xml to specify your own icon.

public int getRewindDrawableResId ()

Returns the resource ID of the icon that indicates a "rewind" button. You can override the alias drawable ic_notification_rewind.xml to specify your own icon.

public int getSkipNextDrawableResId ()

Returns the resource ID of the icon that indicates a "skip next" button. You can override the alias drawable ic_notification_skip_next.xml to specify your own icon.

public int getSkipPrevDrawableResId ()

Returns the resource ID of the icon that indicates a "skip previous" button. You can override the alias drawable ic_notification_skip_prev.xml to specify your own icon.

public long getSkipStepMs ()

Returns the amount to jump if MediaIntentReceiver.ACTION_FORWARD or MediaIntentReceiver.ACTION_REWIND are included in the notification actions. Any tap on those actions will result in moving the media position forward or backward by skipStepMs milliseconds. The default value is SKIP_STEP_TEN_SECONDS_IN_MS.

public int getSmallIconDrawableResId ()

Returns the resource ID of the small icon that will be used to build the notification. You can override the alias drawable ic_notification_small_icon.xml to specify your own icon.

public int getStopLiveStreamDrawableResId ()

Returns the resource ID of the icon that indicates a "stop playing live stream" button. You can override the alias drawable ic_notification_stop_live_stream.xml to specify your own icon.

public int getStopLiveStreamTitleResId ()

Returns the resource ID of the label for the "Stop live stream" button.

public String getTargetActivityClassName ()

Returns the name of the Activity that will be launched when user taps on the content area of the notification.

public void writeToParcel (Parcel out, int flags)