Skip to content

General: Add Bluetooth connection status icon to toolbar#514

Open
d4rken wants to merge 1 commit intomainfrom
feat/bluetooth-toolbar-icon
Open

General: Add Bluetooth connection status icon to toolbar#514
d4rken wants to merge 1 commit intomainfrom
feat/bluetooth-toolbar-icon

Conversation

@d4rken
Copy link
Copy Markdown
Member

@d4rken d4rken commented Apr 14, 2026

What changed

Added a dynamic Bluetooth status icon to the overview toolbar that shows the current connection state at a glance and links to Android Bluetooth settings.

  • Icon is hidden until you have a device profile and Bluetooth permissions are granted
  • Shows a red Bluetooth icon when Bluetooth is disabled
  • Shows a default Bluetooth icon when a profiled device is detected nearby
  • Shows a blue "Bluetooth Connected" icon when a profiled device is connected via system Bluetooth
  • Tapping the icon opens Android Bluetooth settings

Technical Context

  • System Bluetooth connection state (BluetoothManager2.connectedDevices) is merged into PodDevice via DeviceMonitor, so the toolbar icon reacts as soon as the classic BR/EDR headset profile connects — it does not wait for the AAP handshake to complete
  • The intent launch for Bluetooth settings is wrapped in a SecurityException catch for devices that gate settings access behind Bluetooth permissions
  • connectedDevices is joined with onStart { emit(emptyList()) } so it doesn't block the initial combine emission while the StateFlow replays its first value

@d4rken d4rken added the enhancement Add a new feature of improve an existing feature label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Add a new feature of improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant