CastMediaOptions.Builder

public static final classCastMediaOptions.BuilderextendsObject

A builder to create an instance ofCastMediaOptions.

Public Constructor Summary

Public Method Summary

CastMediaOptions
build()
Builds and returns the CastMediaOptionsobject.
CastMediaOptions.Builder
setExpandedControllerActivityClassName(StringclassName)
Sets the class name of the expanded controllerActivity.
CastMediaOptions.Builder
CastMediaOptions.Builder
setMediaIntentReceiverClassName(StringclassName)
Sets the class name of the MediaIntentReceiver.
CastMediaOptions.Builder
setMediaSessionEnabled(boolean enabled)
Enables or disables theMediaSession created and managed by the Cast SDK.
CastMediaOptions.Builder
setNotificationOptions(NotificationOptions notificationOptions)
Sets the NotificationOptionsused to configure the notification with NotificationCompat.MediaStyle.

Inherited Method Summary

Public Constructors

publicBuilder()

Public Methods

publicCastMediaOptions build()

Builds and returns theCastMediaOptions object.

public CastMediaOptions.BuildersetExpandedControllerActivityClassName(String className)

Sets the class name of the expanded controllerActivity.The default value isnull.

public CastMediaOptions.BuildersetImagePicker(ImagePicker imagePicker)

Sets theImagePicker. The SDK will call it to choose an appropriate image to be used in different UIs. If ImagePicker is not set, or is set tonull,the SDK will pick the first image from the list of images in the current playing item'sMediaMetadata.

public CastMediaOptions.BuildersetMediaIntentReceiverClassName(String className)

Sets the class name of the MediaIntentReceiver. The default value is MediaIntentReceiver.If your app calls this method, the custom MediaIntentReceivershould be declared in the application's manifest. See also MediaIntentReceiver.

public CastMediaOptions.BuildersetMediaSessionEnabled(boolean enabled)

Enables or disables theMediaSession created and managed by the Cast SDK. It is enabled by default.

If an app is configured to disable a media session created by the Cast SDK, the app itself must create a media session.

public CastMediaOptions.BuildersetNotificationOptions(NotificationOptions notificationOptions)

Sets the NotificationOptionsused to configure the notification withNotificationCompat.MediaStyle. The default value is a NotificationOptionswith all default options. If set tonull then the notification is disabled.