<GCKDiscoveryManagerListener> 协议
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承 <NSObjectNSObject>。
- (void) didStartDiscoveryForDeviceCategory: |
|
(NSString *) |
deviceCategory |
|
|
optional |
- (void) willUpdateDeviceList |
|
|
|
|
optional |
- (void) didUpdateDeviceList |
|
|
|
|
optional |
- (void) didInsertDevice: |
|
(GCKDevice *) |
device |
atIndex: |
|
(NSUInteger) |
index |
|
|
| |
|
optional |
当新发现的设备插入到设备列表中时调用。
- Parameters
-
device | The device that was inserted. |
index | The list index at which the device was inserted. |
- (void) didUpdateDevice: |
|
(GCKDevice *) |
device |
atIndex: |
|
(NSUInteger) |
index |
|
|
| |
|
optional |
在之前发现的设备更新时调用。
- Parameters
-
device | The device that was updated. |
index | The list index of the device. |
- (void) didUpdateDevice: |
|
(GCKDevice *) |
device |
atIndex: |
|
(NSUInteger) |
index |
andMoveToIndex: |
|
(NSUInteger) |
newIndex |
|
|
| |
|
optional |
当列表中发现的设备进行更新和/或重新排序时调用。
- Parameters
-
device | The device that was updated. |
index | The previous list index of the device. |
newIndex | The current list index of the device. |
- (void) didRemoveDeviceAtIndex: |
|
(NSUInteger) |
index |
|
|
optional |
当之前发现的设备处于离线状态并已从设备列表中移除时调用。
- Parameters
-
index | The list index of the device that was removed. |
- (void) didRemoveDevice: |
|
(GCKDevice *) |
device |
atIndex: |
|
(NSUInteger) |
index |
|
|
| |
|
optional |
当之前发现的设备处于离线状态并已从设备列表中移除时调用。
这是 didRemoveDeviceAtIndex: 的替代方法。如果两种方法都实现,则将调用二者。
- Parameters
-
device | The device that was removed. |
index | The list index of the device that was removed. |
- 开始时间
- 4.1
- (void) didHaveDiscoveredDeviceWhenStartingDiscovery |
|
|
|
|
optional |
在发现过程开始之前,在列表中存在一些之前发现的设备时调用。
自上次发现进程发现后,这些设备仍然有效且未过期。可以使用 deviceCount: 和 deviceAtIndex: 获取之前发现的设备的完整列表。
- 开始时间
- 4.4.1
如未另行说明,那么本页面中的内容已根据知识共享署名 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 `GCKDiscoveryManagerListener` protocol manages the device discovery process, providing updates on discovered Cast devices."],["It provides methods to track the start of device discovery, list updates, insertion, updates, removals, and device reorderings."],["The protocol includes optional methods that allow listeners to get notified about events like when a previously discovered device is still in the list when a new discovery session starts or when some discovered devices are about to be updated or are updated in some way.."],["Since version 4.1, it offers an alternative method for device removal notification."],["Introduced in version 3.0 and updated in subsequent versions with additional functionalities for device discovery management."]]],[]]