java.lang.Object | |
↳ | com.google.android.gms.cast.framework.media.NotificationOptions.Builder |
A builder to create an instance of NotificationOptions
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds and returns the
NotificationOptions object. | |||||||||||
Sets at most 5 actions to show in the notification, and the indices to the actions to
show in the compat view.
| |||||||||||
Sets the resource ID of the icon that indicates "disconnect".
| |||||||||||
Sets the resource ID of the icon that indicates "skip forward 10 seconds".
| |||||||||||
Sets the resource ID of the icon that indicates "skip forward 30 seconds".
| |||||||||||
Sets the resource ID of the icon that indicates "skip forward".
| |||||||||||
Sets the resource ID of the icon that indicates "pause".
| |||||||||||
Sets the resource ID of the icon that indicates "play".
| |||||||||||
Sets the resource ID of the icon that indicates "rewind 10 seconds".
| |||||||||||
Sets the resource ID of the icon that indicates "rewind 30 seconds".
| |||||||||||
Sets the resource ID of the icon that indicates "rewind".
| |||||||||||
Sets the resource ID of the icon that indicates "skip next".
| |||||||||||
Sets the resource ID of the icon that indicates "skip previous".
| |||||||||||
Sets the amount to jump if
ACTION_FORWARD or
ACTION_REWIND are included for the notification actions. | |||||||||||
Sets the resource ID for the notification icon drawable.
| |||||||||||
Sets the resource ID of the icon that indicates "stop playing live stream".
| |||||||||||
Sets the name of the
Activity that will be launched when user taps on the
content area of the notification. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Builds and returns the NotificationOptions
object.
Returns | |
---|---|
NotificationOptions |
Sets at most 5 actions to show in the notification, and the indices to the actions to
show in the compat view. If both actions
and compatActionIndices
are
null
, the default values, ACTION_TOGGLE_PLAYBACK
and
ACTION_STOP_CASTING
will be used.
Parameters | |
---|---|
actions |
List :
The list of actions, defined in MediaIntentReceiver . |
compatActionIndices |
int :
Indices of the actions in actions list, which will be
shown in the compat view. |
Returns | |
---|---|
NotificationOptions.Builder |
Throws | |
---|---|
IllegalArgumentException |
if actions and compatActionIndices are
not either both null or non-null , or if the length of
compatActionIndices is greater than the size of actions , or if any index
in compatActionIndices is out of range. |
See also:
Sets the resource ID of the icon that indicates "disconnect".
By default, a drawable ic_notification_disconnect.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "skip forward 10 seconds".
By default, a drawable ic_notification_forward10.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "skip forward 30 seconds".
By default, a drawable ic_notification_forward30.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "skip forward".
By default, a drawable ic_notification_forward.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "pause".
By default, a drawable ic_notification_pause.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "play".
By default, a drawable ic_notification_play.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "rewind 10 seconds".
By default, a drawable ic_notification_rewind10.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "rewind 30 seconds".
By default, a drawable ic_notification_rewind30.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "rewind".
By default, a drawable ic_notification_rewind.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "skip next".
By default, a drawable ic_notification_skip_next.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "skip previous".
By default, a drawable ic_notification_skip_prev.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the amount to jump if ACTION_FORWARD
or
ACTION_REWIND
are included for the notification actions. Any
tap on those actions will result in moving the media position forward or backward by
notificationSkipStepMs
milliseconds. The default value is
SKIP_STEP_TEN_SECONDS_IN_MS
.
Parameters | |
---|---|
notificationSkipStepMs |
long :
The amount of time to skip, in milliseconds. |
Returns | |
---|---|
NotificationOptions.Builder |
Throws | |
---|---|
IllegalArgumentException |
if notificationSkipStepMs is not positive.
|
Sets the resource ID for the notification icon drawable.
By default, a drawable ic_notification_small_icon.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the resource ID of the icon that indicates "stop playing live stream".
By default, a drawable ic_notification_stop_live_stream.xml
from the SDK is used.
Parameters | |
---|---|
resId |
int
|
Returns | |
---|---|
NotificationOptions.Builder |
Sets the name of the Activity
that will be launched when user taps on the
content area of the notification. If set to null
then clicking on the content
area will not launch any Activity
. The default value is null
.
Parameters | |
---|---|
className |
String
|
Returns | |
---|---|
NotificationOptions.Builder |