GCKSession(Protected) Category
Stay organized with collections
Save and categorize content based on your preferences.
Methods to be overridden and called by GCKSession
subclasses only.
- Since
- 3.0
Ends the session with the specified action. More...
Called by subclasses to notify the framework that the session has been started. More...
Called by subclasses to notify the framework that the session has failed to start. More...
Called by subclasses to notify the framework that the session has ended. More...
Called by subclasses to notify the framework that updated device volume and mute state has been received from the device. More...
Called by subclasses to notify the framework that updated status has been received from the device. More...
Deprecated, do not use - implemented as a no-op. More...
Deprecated, do not use - implemented as a no-op. More...
Starts the session.
This is an asynchronous operation. Must be overridden by subclasses.
Extends class GCKSession
.
Ends the session with the specified action.
This is an asynchronous operation. Must be overridden by subclasses.
- Parameters
-
action
The action to take when ending the session; see GCKSessionEndAction for more details.
Extends class GCKSession
.
- (void) notifyDidStartWithSessionID: |
|
(NSString *) |
sessionID
|
|
Called by subclasses to notify the framework that the session has been started.
- Parameters
-
sessionID
The session's unique ID.
Extends class GCKSession
.
- (void) notifyDidFailToStartWithError: |
|
( GCKError
*) |
error
|
|
Called by subclasses to notify the framework that the session has failed to start.
- Parameters
-
error
The error that occurred.
Extends class GCKSession
.
- (void) notifyDidEndWithError: |
|
(nullable NSError *) |
error
|
willTryToResume: |
|
(BOOL) |
willTryToResume
|
|
|
|
|
Called by subclasses to notify the framework that the session has ended.
- Parameters
-
error |
The error that caused the session to end, if any. Should be nil
if the session was ended intentionally. |
willTryToResume |
Whether the session will try to resume itself automatically. |
Extends class GCKSession
.
- (void) notifyDidReceiveDeviceVolume: |
|
(float) |
volume
|
muted: |
|
(BOOL) |
muted
|
|
|
|
|
Called by subclasses to notify the framework that updated device volume and mute state has been received from the device.
- Parameters
-
volume |
The device's current volume. Must be in the range [0, 1.0]; |
muted |
The device's current mute state. |
Extends class GCKSession
.
- (void) notifyDidReceiveDeviceStatus: |
|
(nullable NSString *) |
statusText
|
|
Called by subclasses to notify the framework that updated status has been received from the device.
- Parameters
-
statusText
The new status.
Extends class GCKSession
.
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-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGCKSession(Protected)\u003c/code\u003e category provides methods for managing sessions with receiver devices, including starting, ending, and handling session lifecycle events.\u003c/p\u003e\n"],["\u003cp\u003eSubclasses must override the \u003ccode\u003estart\u003c/code\u003e and \u003ccode\u003eendWithAction:\u003c/code\u003e methods to implement session management logic.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003enotifyDidStartWithSessionID:\u003c/code\u003e and \u003ccode\u003enotifyDidEndWithError:willTryToResume:\u003c/code\u003e allow subclasses to inform the framework of session state changes.\u003c/p\u003e\n"],["\u003cp\u003eThe category provides methods to handle device volume, mute state, and status updates.\u003c/p\u003e\n"],["\u003cp\u003eMethods \u003ccode\u003enotifyDidSuspendWithReason:\u003c/code\u003e and \u003ccode\u003enotifyDidResume\u003c/code\u003e are deprecated and should not be used.\u003c/p\u003e\n"]]],["GCKSession subclasses must override methods to manage session lifecycle. These include `-start` to begin a session and `-endWithAction:` to terminate it. Subclasses notify the framework of session events like start (`-notifyDidStartWithSessionID:`), failure (`-notifyDidFailToStartWithError:`), and end (`-notifyDidEndWithError:willTryToResume:`). They also relay device updates such as volume/mute status (`-notifyDidReceiveDeviceVolume:muted:`) and device status (`-notifyDidReceiveDeviceStatus:`). Methods `-notifyDidSuspendWithReason:` and `-notifyDidResume` are deprecated.\n"],null,[]]