Cast.CastOptions.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Constructors
Parameters
castDevice |
The Cast receiver device returned from the MediaRouteProvider. May not be
null . |
castListener |
The listener for Cast events. May not be null . |
Public Methods
Builds a CastOptions with the arguments supplied to this builder.
public Cast.CastOptions.Builder
setVerboseLoggingEnabled (boolean enabled)
Enables or disables verbose logging for this Cast session. This option is provided
to aid in testing and debugging, and should not be enabled in release builds.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eCast.CastOptions.Builder\u003c/code\u003e helps configure API parameters for Google Cast integration.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to set up a Cast session with a specific device and listener.\u003c/p\u003e\n"],["\u003cp\u003eYou can enable verbose logging for debugging, but it's recommended for testing only.\u003c/p\u003e\n"],["\u003cp\u003eFinally, use the \u003ccode\u003ebuild()\u003c/code\u003e method to create a \u003ccode\u003eCast.CastOptions\u003c/code\u003e instance with your configurations.\u003c/p\u003e\n"]]],[],null,["# Cast.CastOptions.Builder\n\npublic static final class **Cast.CastOptions.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nA builder to create an instance of [Cast.CastOptions](/android/reference/com/google/android/gms/cast/Cast.CastOptions)\nto set API configuration parameters for [Cast](/android/reference/com/google/android/gms/cast/Cast). \n\n### Public Constructor Summary\n\n|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/android/reference/com/google/android/gms/cast/Cast.CastOptions.Builder#Builder(com.google.android.gms.cast.CastDevice,%20com.google.android.gms.cast.Cast.Listener))([CastDevice](/android/reference/com/google/android/gms/cast/CastDevice) castDevice, [Cast.Listener](/android/reference/com/google/android/gms/cast/Cast.Listener) castListener) Creates a builder of [Cast.CastOptions](/android/reference/com/google/android/gms/cast/Cast.CastOptions) to set API configuration parameters for [Cast](/android/reference/com/google/android/gms/cast/Cast). |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Cast.CastOptions](/android/reference/com/google/android/gms/cast/Cast.CastOptions) | [build](/android/reference/com/google/android/gms/cast/Cast.CastOptions.Builder#build())() Builds a CastOptions with the arguments supplied to this builder. |\n| [Cast.CastOptions.Builder](/android/reference/com/google/android/gms/cast/Cast.CastOptions.Builder) | [setVerboseLoggingEnabled](/android/reference/com/google/android/gms/cast/Cast.CastOptions.Builder#setVerboseLoggingEnabled(boolean))(boolean enabled) Enables or disables verbose logging for this Cast session. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **Builder** ([CastDevice](/android/reference/com/google/android/gms/cast/CastDevice) castDevice, [Cast.Listener](/android/reference/com/google/android/gms/cast/Cast.Listener) castListener)\n\nCreates a builder of [Cast.CastOptions](/android/reference/com/google/android/gms/cast/Cast.CastOptions)\nto set API configuration parameters for [Cast](/android/reference/com/google/android/gms/cast/Cast). \n\n##### Parameters\n\n| castDevice | The Cast receiver device returned from the MediaRouteProvider. May not be `null`. |\n| castListener | The listener for Cast events. May not be `null`. |\n|--------------|-----------------------------------------------------------------------------------|\n\nPublic Methods\n--------------\n\n#### public [Cast.CastOptions](/android/reference/com/google/android/gms/cast/Cast.CastOptions)\n**build** ()\n\nBuilds a CastOptions with the arguments supplied to this builder. \n\n#### public [Cast.CastOptions.Builder](/android/reference/com/google/android/gms/cast/Cast.CastOptions.Builder)\n**setVerboseLoggingEnabled** (boolean enabled)\n\nEnables or disables verbose logging for this Cast session. This option is provided\nto aid in testing and debugging, and should not be enabled in release builds."]]