Skip to content

Core Work Status Overview

Mr.P edited this page Aug 25, 2026 · 1 revision

Work Status Overview

Welcome to the Work Status documentation for the AIBuds SDK. This section covers APIs for monitoring the device's current operational status, providing real-time information about what the device is doing.

Available Features

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

Getting Started

To monitor work status, follow these steps:

  1. Connect to Device - Establish a connection with your AIBuds device
  2. Check Protocol Conformance - Verify the device conforms to DeviceWorkStateAPI protocol
  3. Get Status - Read the current workState property
  4. Listen for Changes - Implement device(_:didWorkStateChanged:) on the device delegate

Key Concepts

Work Status States

See Work States for the complete WorkState reference. The values are grouped as:

  • Connection and Idle: Waiting for connection, connected idle, or disconnected idle
  • Playback and Communication: Local music playback, phone calls, or AI conversation
  • Capture and Transfer: Photo capture, video/audio recording, file transfer, or streaming
  • Maintenance: Factory reset, OTA upgrade, shutdown, or device test states

Protocol Reference

Work status functionality is accessed through the DeviceWorkStateAPI protocol:

Swift

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

Objective-C

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

Best Practices

  1. Check Protocol Conformance: Always verify the device supports the DeviceWorkStateAPI protocol
  2. Monitor Status: Use the device delegate callback to update UI when the state changes
  3. Handle State Transitions: Respond appropriately when the device changes state
  4. Avoid Conflicts: Don't initiate operations that conflict with the current state

Notes

  • Work status provides real-time information about device activity
  • Work-state changes can be reported through the optional device delegate callback
  • Some states may prevent certain operations from being performed

AIBuds SDK iOS Wiki

Clone this wiki locally