GCKSession(受保护)类别
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
只能由 GCKSession 子类替换和调用的方法。
- 开始时间
- 3.0
结束具有指定操作的会话。
这是一项异步操作。必须被子类替换。
- Parameters
-
action | The action to take when ending the session; see GCKSessionEndAction for more details. |
扩展 GCKSession 类。
- (void) notifyDidStartWithSessionID: |
|
(NSString *) |
sessionID |
|
由子类调用,以通知框架已启动会话。
- Parameters
-
sessionID | The session's unique ID. |
扩展 GCKSession 类。
- (void) notifyDidFailToStartWithError: |
|
(GCKError *) |
error |
|
由子类调用,以通知框架会话无法启动。
- Parameters
-
error | The error that occurred. |
扩展 GCKSession 类。
- (void) notifyDidEndWithError: |
|
(nullable NSError *) |
error |
willTryToResume: |
|
(BOOL) |
willTryToResume |
|
|
| |
由子类调用,以通知框架会话已结束。
- 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. |
扩展 GCKSession 类。
- (void) notifyDidReceiveDeviceVolume: |
|
(float) |
volume |
muted: |
|
(BOOL) |
muted |
|
|
| |
由子类调用,以通知框架已从设备收到更新后的设备音量和静音状态。
- Parameters
-
volume | The device's current volume. Must be in the range [0, 1.0]; |
muted | The device's current mute state. |
扩展 GCKSession 类。
- (void) notifyDidReceiveDeviceStatus: |
|
(nullable NSString *) |
statusText |
|
由子类调用,以通知框架已从设备收到更新后的状态。
- Parameters
-
statusText | The new status. |
扩展 GCKSession 类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-01。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2023-12-01。"],[[["The `GCKSession(Protected)` category provides methods for managing sessions with receiver devices, including starting, ending, and handling session lifecycle events."],["Subclasses must override the `start` and `endWithAction:` methods to implement session management logic."],["Methods like `notifyDidStartWithSessionID:` and `notifyDidEndWithError:willTryToResume:` allow subclasses to inform the framework of session state changes."],["The category provides methods to handle device volume, mute state, and status updates."],["Methods `notifyDidSuspendWithReason:` and `notifyDidResume` are deprecated and should not be used."]]],[]]