CastReceiverOptions.Builder

  • CastReceiverOptions.Builder is a builder class for creating CastReceiverOptions objects.

  • It has a public constructor that takes a Context object to create an instance.

  • Public methods allow setting custom namespaces, a launch request checker, status text, and the version code of the receiver app.

  • The build() method is used to construct the CastReceiverOptions object with the configured options.

public static class CastReceiverOptions.Builder extends Object

Builder for CastReceiverOptions.

Public Constructor Summary

Builder(Context context)
Creates an instance of CastReceiverOptions.Builder.

Public Method Summary

CastReceiverOptions
build()
Builds a CastReceiverOptions object with the provided options.
CastReceiverOptions.Builder
setCustomNamespaces(List<String> namespaces)
Sets the list of custom namespaces.
CastReceiverOptions.Builder
setLaunchRequestChecker(CastReceiverOptions.LaunchRequestChecker checker)
Sets the callback to check if a launch request is supported.
CastReceiverOptions.Builder
setStatusText(String statusText)
Sets the status text.
CastReceiverOptions.Builder
setVersionCode(int versionCode)
Sets the version code of the receiver app.

Inherited Method Summary

Public Constructors

public Builder (Context context)

Creates an instance of CastReceiverOptions.Builder.

Public Methods

public CastReceiverOptions build ()

Builds a CastReceiverOptions object with the provided options.

public CastReceiverOptions.Builder setCustomNamespaces (List<String> namespaces)

Sets the list of custom namespaces.

public CastReceiverOptions.Builder setLaunchRequestChecker (CastReceiverOptions.LaunchRequestChecker checker)

Sets the callback to check if a launch request is supported. The default callback will always return true.

public CastReceiverOptions.Builder setStatusText (String statusText)

Sets the status text.

public CastReceiverOptions.Builder setVersionCode (int versionCode)

Sets the version code of the receiver app.