คลาสอุปกรณ์ GCK
    
    
      
    
    
      
      จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
    
    
      
      บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
ออบเจ็กต์ที่แสดงถึงอุปกรณ์ตัวรับ 
รับค่า NSObject, <NSCopying> และ <NSSecureCoding>
      
        
          | - (BOOL) isSameDeviceAs: |  | (const GCKDevice *) | other |  | 
      
 
ทดสอบว่าอุปกรณ์นี้อ้างอิงถึงอุปกรณ์จริงเดียวกันกับอุปกรณ์อื่นหรือไม่ 
แสดงผล YES หากออบเจ็กต์ GCKDevice ทั้ง 2 รายการมีหมวดหมู่, รหัสอุปกรณ์, ที่อยู่ IP, พอร์ตบริการ และเวอร์ชันโปรโตคอลเดียวกัน 
 
 
      
        
          | - (BOOL) hasCapabilities: |  | (GCKDeviceCapabilities) | deviceCapabilities |  | 
      
 
แสดงผล YES หากอุปกรณ์รองรับความสามารถทั้งหมดที่ระบุ 
- Parameters
- 
  
    | deviceCapabilities | A bitwise-OR of one or more of the GCKDeviceCapabilities constants. |  
 
 
 
      
        
          | - (void) setAttribute: |  | (NSObject< NSSecureCoding > *) | attribute | 
        
          | forKey: |  | (NSString *) | key | 
        
          |  |  |  |  | 
      
 
ตั้งค่าแอตทริบิวต์ที่กําหนดเองในออบเจ็กต์ 
ผู้ให้บริการที่กำหนดเองอาจใช้เพื่อจัดเก็บข้อมูลเฉพาะอุปกรณ์สำหรับอุปกรณ์ที่ไม่ได้แคสต์
- Parameters
- 
  
    | attribute | The attribute value, which must be key-value coding compliant, and cannot be nil. |  | key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil. |  
 
 
 
      
        
          | - (nullable NSObject<NSSecureCoding> *) attributeForKey: |  | (NSString *) | key |  | 
      
 
ค้นหาแอตทริบิวต์ในออบเจ็กต์ 
- Parameters
- 
  
    | key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil. |  
 
- การคืนสินค้า
- ค่าของแอตทริบิวต์ หรือ nilหากไม่มีแอตทริบิวต์ดังกล่าว
 
 
      
        
          | - (void) removeAttributeForKey: |  | (NSString *) | key |  | 
      
 
นำแอตทริบิวต์ออกจากออบเจ็กต์ 
- Parameters
- 
  
    | key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil. |  
 
 
 
      
        
          | - (void) removeAllAttributes |  |  |  | 
      
 
นำแอตทริบิวต์ทั้งหมดออกจากออบเจ็กต์ 
 
 
      
        
          | + (NSString *) deviceCategoryForDeviceUniqueID: |  | (NSString *) | deviceUniqueID |  | 
      
 
ดึงข้อมูลหมวดหมู่อุปกรณ์จากรหัสที่ไม่ซ้ำกันของอุปกรณ์ 
 
 
- Deprecated:
- ใช้ networkAddress ที่อยู่ IPv4 ของอุปกรณ์ในรูปแบบเครื่องหมายจุด ใช้เมื่อส่งคำขอเครือข่าย ตัวแปรนี้จะเป็นสตริงว่างเปล่าสำหรับออบเจ็กต์ GCKDevice รายการที่สร้างขึ้นด้วยที่อยู่ IPv6 
 
 
ที่อยู่ IP ของอุปกรณ์ 
ใช้เมื่อส่งคำขอเครือข่าย 
- Since
- 4.2 
 
 
ตัวระบุที่ไม่ซ้ำกันสำหรับอุปกรณ์ 
 
 
  
  | 
        
          | - (NSString*) friendlyName |  | readwritenonatomiccopy | 
 
ชื่อที่จำง่ายของอุปกรณ์ 
ชื่อที่ผู้ใช้กำหนด เช่น "ห้องนั่งเล่น" 
 
 
อาร์เรย์ของ GCKImage ออบเจ็กต์ที่มีไอคอนสำหรับอุปกรณ์ 
 
 
  
  | 
        
          | - (GCKDeviceStatus) status |  | readwritenonatomicassign | 
 
สถานะของอุปกรณ์ ณ เวลาที่สแกนครั้งล่าสุด 
 
 
ข้อความสถานะที่รายงานโดยแอปพลิเคชันตัวรับที่กำลังทำงานอยู่ในปัจจุบัน หากมี 
 
 
  
  | 
        
          | - (NSString*) deviceVersion |  | readwritenonatomiccopy | 
 
เวอร์ชันโปรโตคอลของอุปกรณ์ 
 
 
  
  | 
        
          | - (BOOL) isOnLocalNetwork |  | readnonatomicassign | 
 
ใช่ หากอุปกรณ์นี้อยู่ในเครือข่ายภายใน 
 
 
หมวดหมู่อุปกรณ์ ซึ่งเป็นสตริงที่ระบุประเภทอุปกรณ์ได้แบบไม่ซ้ำกัน 
อุปกรณ์แคสต์มีหมวดหมู่เป็น kGCKCastDeviceCategory 
 
 
รหัสที่ไม่ซ้ำกันทั่วโลกของอุปกรณ์นี้ 
นี่คือการเชื่อมพร็อพเพอร์ตี้ category กับ deviceID 
 
 
 
  
  
  
 
  
    
    
    
  
  
  เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
  อัปเดตล่าสุด 2025-07-25 UTC
  
  
  
    
      [null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],["The GCKDevice class represents a receiver device, inheriting from NSObject. Key actions include: checking if a device is the same as another (`isSameDeviceAs:`), verifying device capabilities (`hasCapabilities:`), setting, retrieving, and removing attributes (`setAttribute:forKey:`, `attributeForKey:`, `removeAttributeForKey:`, `removeAllAttributes`), and extracting device category from a unique ID (`deviceCategoryForDeviceUniqueID:`). The class also exposes properties like `ipAddress`, `networkAddress`, `servicePort`, `deviceID`, `friendlyName`, `modelName`, `icons`, `status`, `statusText`, `deviceVersion`, `isOnLocalNetwork`, `type`, `category`, and `uniqueID` for device identification and management.\n"]]