java.lang.Object | |
↳ | com.google.android.gms.cast.framework.SessionProvider |
An abstract base class for performing session construction. The SDK uses a subclass of
SessionProvider
to construct CastSession
internally. If your app wants to support
other types of Session
then you should subclass this class.
Subclasses must implement createSession(String)
and isSessionRecoverable()
, which will be
called by the Cast SDK during the lifecycle of the session.
All methods must be called from the main thread.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a
SessionProvider with a category string. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
Session . | |||||||||||
Returns the category string for this
SessionProvider . | |||||||||||
Returns the application
Context used to construct this instance. | |||||||||||
Returns
true if a previously constructed session can be resumed. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a SessionProvider
with a category string. The category uniquely identifies
a Session
created by this provider.
Parameters | |
---|---|
applicationContext |
Context :
The application Context of the calling app. |
category |
String :
The category string used to create Session .
|
Returns the category string for this SessionProvider
.
Returns | |
---|---|
String |
Returns the application Context
used to construct this instance.
Returns | |
---|---|
Context |
Returns true
if a previously constructed session can be resumed. Subclasses should
check any persisted information about the previous session, such as a session ID, and return
true only if it is possible to resume that session.
This method is called by the SDK when it tries to resume a previously saved session.
Returns | |
---|---|
boolean |