<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):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],["The GCKDiscoveryManagerListener protocol manages device discovery. Key actions include being notified when discovery starts for a device category and when the device list is updated. Notifications are triggered when devices are inserted, updated, or removed from the list, with index information provided. The protocol also handles updates where devices are reordered in the list and when devices were already discovered before starting the discovery process. These updates provide device details and their positions within the list.\n"],null,[]]