public class

NotificationOptions

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.cast.framework.media.NotificationOptions

Class Overview

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.

Summary

Nested Classes
class NotificationOptions.Builder A builder to create an instance of NotificationOptions
Constants
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.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
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 ACTION_FORWARD or 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)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final long SKIP_STEP_TEN_SECONDS_IN_MS

Constant for notification skip step, ten seconds in milliseconds.

Constant Value: 10000 (0x0000000000002710)

public static final long SKIP_STEP_THIRTY_SECONDS_IN_MS

Constant for notification skip step, thirty seconds in milliseconds.

Constant Value: 30000 (0x0000000000007530)

Public Methods

public List<String> getActions ()

Returns the list of actions to show in the notification.

Returns
List<String>

public int getCastingToDeviceStringResId ()

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

Returns
int

public int[] getCompatActionIndices ()

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

Returns
int[]

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

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.

Returns
int

public long getSkipStepMs ()

Returns the amount to jump if ACTION_FORWARD or 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.

Returns
long

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.

Returns
int

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.

Returns
int

public int getStopLiveStreamTitleResId ()

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

Returns
int

public String getTargetActivityClassName ()

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

Returns
String

public void writeToParcel (Parcel out, int flags)

Parameters
out Parcel
flags int