<GCKDiscoveryManagerListener> โปรโตคอล
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
โปรโตคอล Listener GCKDiscoveryManager
- Since
- 3.0
รับค่า <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: หากมีการติดตั้งใช้งานทั้งคู่ ระบบจะเรียกใช้ทั้ง 2 รายการ
- Parameters
-
device | The device that was removed. |
index | The list index of the device that was removed. |
- Since
- 4.1
- (void) didHaveDiscoveredDeviceWhenStartingDiscovery |
|
|
|
|
optional |
มีการเรียกใช้เมื่อมีอุปกรณ์ที่ค้นพบก่อนหน้านี้บางรายการในรายการก่อนกระบวนการค้นหาจะเริ่มขึ้น
อุปกรณ์เหล่านี้ยังใช้งานได้และไม่หมดอายุนับตั้งแต่ที่กระบวนการค้นหาครั้งล่าสุดค้นพบ คุณสามารถดูรายการอุปกรณ์ทั้งหมดที่ค้นพบก่อนหน้านี้ได้โดยใช้ deviceCount: และ deviceAtIndex:
- Since
- 4.4.1
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-01 UTC
[[["เข้าใจง่าย","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"]],["อัปเดตล่าสุด 2023-12-01 UTC"],[[["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."]]],["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"]]