# Companion ring pairing

## Purpose

Demonstrate scanning, attaching, and surfacing headset companion ring telemetry on the phone.

## Entry points

Phone settings hierarchy:

- `SettingActivity` → `DeviceLinerActivity`

Sample Activity:

- `com.rokid.phone.ui.DeviceLinerActivity`

## Platform

- Phone

## Main files

- [DeviceLinerActivity.kt](https://gitee.com/as_pixar/glass3sdkdemo/blob/main/glass3sdkphonedemo/app/src/main/java/com/rokid/phone/ui/DeviceLinerActivity.kt)
- [DeviceLinkerAdapter.kt](https://gitee.com/as_pixar/glass3sdkdemo/blob/main/glass3sdkphonedemo/app/src/main/java/com/rokid/phone/ui/DeviceLinkerAdapter.kt)

## Flow

1. Register `IBTRingClientListener`.  
2. Call `startScan()` with curated filters for supported ring SKUs.  
3. Populate the Recycler list with discoveries.  
4. On tap, call `connectToServer()` and await callbacks updating UI badges.

## Highlighted APIs

- Ring-aware discovery  
- Dedicated connect shim  
- Result callbacks powering UI badges  

## Caveats

- Filters hard-code friendly names (`D01`, `D06`) — adjust before retail.  
- UI surfaces both connected/disconnected states inline.  
- Flipping “connection enabled” toggle stops scans and forcibly disconnects the active ring session.  
