java.lang.Object |
↳ |
com.google.android.gms.cast.framework.SessionManager |
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
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 Methods
Adds a SessionManagerListener
to monitor events from any type of Session
instance.
Parameters |
listener |
SessionManagerListener
|
Throws |
NullPointerException |
If listener is null . |
IllegalStateException |
If this method is not called on the main thread.
|
public
void
addSessionManagerListener
(SessionManagerListener<T> listener, Class<T> sessionClass)
Adds a SessionManagerListener
to monitor events from a Session
instance whose
class is sessionClass
.
Parameters |
listener |
SessionManagerListener
|
sessionClass |
Class
|
Throws |
NullPointerException |
If listener or sessionClass are null . |
IllegalStateException |
If this method is not called on the main thread.
|
public
void
endCurrentSession
(boolean stopCasting)
Ends the current session.
Parameters |
stopCasting |
boolean :
Should the receiver application be stopped when ending the current
Session. |
Throws |
IllegalStateException |
If this method is not called on the main thread.
|
public
CastSession
getCurrentCastSession
()
Returns the current session if it is an instance of CastSession
, otherwise returns
null
.
Throws |
IllegalStateException |
If this method is not called on the main thread.
|
public
Session
getCurrentSession
()
Returns the currently active session. Returns null
if no session is active.
Throws |
IllegalStateException |
If this method is not called on the main thread.
|
Removes the SessionManagerListener
.
Throws |
IllegalStateException |
If this method is not called on the main thread.
|
public
void
removeSessionManagerListener
(SessionManagerListener<T> listener, Class sessionClass)
Removes the SessionManagerListener
.
Throws |
NullPointerException |
If sessionClass is null . |
IllegalStateException |
If this method is not called on the main thread.
|