How l1ghtshaper/bt-charge-indicator works
BT Charge Indicator is a Windows system-tray app that reads battery levels from paired Bluetooth devices and presents a quick status, device list, and settings. Its main workflow is: launch the tray app, scan Bluetooth devices using multiple Windows and device-specific protocols, combine readings into device state, then render tray status and notify on relevant changes. Additional capabilities include diagnostics, saved preferences, startup options, and update checks. The graph follows documented and indexed relationships; unsampled subsystem wiring is omitted where it cannot be verified.
Main entry points: TrayApplicationContext.cs Tray controller · BluetoothBatteryService.cs Bluetooth scanner · Program.cs App entry point · DesktopNotificationService.cs Desktop notifications
Components 29
Tray experience
- App entry point
Program.cs - Tray controller
UI/TrayApplicationContext.cs - Tray icon renderer
UI/TrayIconRenderer.cs - Connection cards
UI/ConnectionToastForm.cs - Connection presenter
UI/ConnectionNotificationPresenter.cs - App branding
UI/AppBranding.cs - Text prompt
UI/TextPrompt.cs
Battery detection
- Device reading model
Models/BluetoothBatteryDevice.cs - Earbud readings
Models/TwsBatteryReading.cs - Tray reading model
Models/TrayReading.cs - Bluetooth scanner
Services/BluetoothBatteryService.cs - Device watcher
Services/BluetoothDeviceWatcher.cs - AirPods reader
Services/AirPodsBatteryService.cs - Fast Pair reader
Services/FastPairBatteryService.cs - Nothing reader
Services/NothingBatteryService.cs - DualSense reader
Services/DualSenseBatteryService.cs
State and preferences
- Localized text
Localization/AppText.cs - App preferences
Settings/AppSettings.cs - Settings store
Settings/SettingsStore.cs - Battery history
Services/BatteryHistory.cs - Connection tracker
Services/DeviceConnectionTracker.cs - GATT probe history
Services/GattProbeHistory.cs
Notifications and utilities
- Desktop notifications
Services/DesktopNotificationService.cs - Device diagnostics
Services/DiagnosticReport.cs - Windows startup
Services/AutoStartManager.cs - Update checks
Services/UpdateService.cs - Error logger
Services/AppLogger.cs
Other components
- Windows user
- Windows Bluetooth
Connections 33
- Windows user → App entry point: launches
README.md - App entry point → Settings store: loads settings
Program.cs - App entry point → Localized text: sets language
Program.cs - App entry point → Tray controller: starts UI
Program.cs - Tray controller → Bluetooth scanner: requests scans
UI/TrayApplicationContext.cs - Tray controller → Device watcher: tracks devices
UI/TrayApplicationContext.cs - Device watcher → Bluetooth scanner: refreshes devices
Services/BluetoothDeviceWatcher.cs - Bluetooth scanner → Windows Bluetooth: reads Bluetooth
README.md - Bluetooth scanner → AirPods reader: reads advertisements
Services/BluetoothBatteryService.cs - Bluetooth scanner → Fast Pair reader: reads advertisements
Services/BluetoothBatteryService.cs - Bluetooth scanner → Nothing reader: reads RFCOMM
Services/BluetoothBatteryService.cs - Bluetooth scanner → DualSense reader: reads HID
Services/BluetoothBatteryService.cs - Bluetooth scanner → Device reading model: produces readings
Services/BluetoothBatteryService.cs - Nothing reader → Earbud readings: returns components
Services/NothingBatteryService.cs - Fast Pair reader → Earbud readings: returns components
Services/FastPairBatteryService.cs - Tray controller → Tray icon renderer: renders status
UI/TrayApplicationContext.cs - Tray controller → Tray reading model: selects reading
UI/TrayApplicationContext.cs - Tray controller → Settings store: saves preferences
Settings/SettingsStore.cs - Settings store → App preferences: loads and saves
Settings/SettingsStore.cs - Tray controller → Connection tracker: tracks changes
UI/TrayApplicationContext.cs - Tray controller → Battery history: records readings
Services/BatteryHistory.cs - Bluetooth scanner → GATT probe history: uses probe history
Services/BluetoothBatteryService.cs - Tray controller → Connection presenter: shows connection cards
UI/TrayApplicationContext.cs - Connection presenter → Connection cards: presents cards
UI/ConnectionNotificationPresenter.cs - Tray controller → Desktop notifications: shows low battery
UI/TrayApplicationContext.cs - Desktop notifications → Localized text: gets notification text
Services/DesktopNotificationService.cs - Tray controller → Device diagnostics: builds reports
UI/TrayApplicationContext.cs - Tray controller → Windows startup: configures startup
README.md - Tray controller → Update checks: checks releases
UI/TrayApplicationContext.cs - Bluetooth scanner → Error logger: logs failures
Services/BluetoothBatteryService.cs - Desktop notifications → Error logger: logs failures
Services/DesktopNotificationService.cs - Text prompt → App branding: uses branding
UI/TextPrompt.cs - Connection cards → Localized text: gets card text
UI/ConnectionToastForm.cs