Classic Bluetooth scan & connect
Purpose
Show how the phone app scans for Glass 3 devices, lists peers, and launches the classic Bluetooth handshake.
Entry points
Phone home:
- Tap add device from
MainPhoneActivity.
Sample screen:
com.rokid.phone.ui.classicbt.ui.ClassicBtActivity
Platform
- Phone
Main files
Flow
- Ensure system Bluetooth is powered on.
- After entering the scan UI, call
startScanBt. - ViewModel events stream results back to Compose / UI.
- When the user taps a row, remember which device is pending.
- Navigate to the unified pairing hub
BtWifiConnectActivity.
Notes for developers
Why pairing is not finished here
This page only discovers + selects peers. Connection and P2P follow-up are centralized in BtWifiConnectActivity so Bluetooth and P2P pairing do not each implement their own duplicated state machine.
What you are listing
Classic Bluetooth devices — not raw BLE advertisements.
Caveats
- If BT is off, the flow guides the user through enabling it.
- On exit, animations / loading states are cleared.
- If discovery returns nothing, navigation routes to a dedicated “not found” helper screen.