Skip to content

Core Device Info Overview

Mr.P edited this page Aug 26, 2026 · 2 revisions

Device Info Overview

Welcome to the Device Info documentation for the AIBuds SDK. This section covers reading the device's current information and reported capabilities, adapting to its physical controls, synchronizing or setting its time, reading and changing its language, and requesting the latest storage and media-count information.

Available Features

Browse the generated Wiki navigation for the pages in this section.

Getting Started

To interact with device information, follow these steps:

  1. Connect to Device - Establish a connection with your AIBuds device
  2. Check Protocol Conformance - Verify the device conforms to DeviceInfoAPI protocol
  3. Read or Update Information - Read the available properties directly, or call the appropriate method when information must be refreshed or changed

Key Concepts

Device Information

  • Device Details: Read the properties currently exposed by the device, including its identity, firmware, connection state, battery status, device capabilities, hardware configuration, current and supported languages, call status, storage and media state, recording-duration support, AI capabilities, and co-processor model
  • Time Management: Synchronize the device with the current time or set a specific time
  • Language Settings: Read the current language from languageSetting, inspect supportedLanguages, and set a supported DeviceLanguage value
  • Storage Information: Request the latest storage information, then read used and free space in megabytes from storageInfo
  • Media Count: Request the latest media information, then read photo, video, and audio counts from mediaCountInfo

Protocol Reference

Base identity and connection properties are available through DeviceConvertible. Additional Device Info properties and methods are exposed through DeviceInfoAPI. Before using those additional capabilities, verify that the device conforms to the protocol:

Swift

```swift
guard let device = device as? DeviceInfoAPI else {
    print("Device does not support DeviceInfoAPI")
    return
}
```

Objective-C

```objc
id<AIBudsDeviceInfoAPI> device = (id<AIBudsDeviceInfoAPI>)self.device;
if (![device conformsToProtocol:@protocol(AIBudsDeviceInfoAPI)]) {
    NSLog(@"Device does not support AIBudsDeviceInfoAPI");
    return;
}
```

Best Practices

  1. Check Protocol Conformance: Always verify the device supports the DeviceInfoAPI protocol before calling methods
  2. Handle Errors: Implement proper error handling in completion handlers
  3. Background Execution: Wrap UI updates in DispatchQueue.main.async when updating from completion handlers
  4. Use Weak Self When Needed: Use [weak self] when a completion handler captures its owning object and could otherwise create a retain cycle
  5. Read Refreshed Properties After Success: After a storage or media-count request succeeds, read the updated storageInfo or mediaCountInfo property
  6. Use Reported Capabilities: Gate optional features with deviceCapabilities; treat nil as not-yet-known, and use hardwareConfiguration to adapt instructions and controls to the fitted hardware

Notes

  • Device information may vary depending on the device model and firmware version
  • Some devices may not support all features described in this section
  • Check protocol conformance, device-reported capability values, device model, and firmware before exposing a feature in your application

AIBuds SDK iOS Wiki

Clone this wiki locally