AI-generated Key Takeaways
-
The
OptionsProvider
interface is implemented by developers to supply options for creating and initializing aCastContext
. -
Implementations must have a no-argument constructor for instantiation by the SDK.
-
It provides methods for defining
CastOptions
to control Cast device discovery and session management. -
It allows providing custom
SessionProvider
instances for handling non-Cast devices, which is optional.
Developers should implement this interface to provide options needed to create and
initialize CastContext
.
The implementation class must have a constructor without argument. The SDK will call that
constructor to instantiate a new instance.
Public Method Summary
abstract List<SessionProvider> |
getAdditionalSessionProviders(Context
appContext)
Provides a list of custom
SessionProvider instances for non-Cast devices.
|
abstract CastOptions |
getCastOptions(Context
appContext)
Provides
CastOptions ,
which affects discovery and session management of a Cast device.
|
Public Methods
public abstract List<SessionProvider> getAdditionalSessionProviders (Context appContext)
Provides a list of custom SessionProvider
instances for non-Cast devices. This is optional.
Parameters
appContext | The application Context . |
---|
Returns
- the list of
SessionProvider
instances, may benull
.
public abstract CastOptions getCastOptions (Context appContext)
Provides CastOptions
,
which affects discovery and session management of a Cast device.
Parameters
appContext | The application Context . |
---|
Returns
- the
CastOptions
, must not benull
.