Add a small native Android companion capability so Hermeven can determine the relevant device context before producing spoken output:
whether Android Auto projection is active;
which audio outputs are connected and which route is actually selected;
whether Galaxy Buds or another Bluetooth headset is available/active;
whether the Even glasses are connected and, where supported, being worn;
whether audio should remain on the phone as the fallback.
The system must distinguish “connected,” “available,” “selected for output,” and “worn.” It must not claim that earbuds or glasses are being worn merely because Bluetooth is connected.
Verified current state
Current-state inspection is pinned to main at f02715fb6487f4e2ff0adeccfaad2403e1724aa5.
The current Hermeven tree has browser/TypeScript client and bridge layers, but no Android-native audio-route or Android Auto integration was found.
Android exposes the core signals needed for a companion implementation:
androidx.car.app.connection.CarConnection reports Android Auto projection using CONNECTION_TYPE_PROJECTION.
AudioManager and AudioDeviceCallback expose connected output-device changes and communication-device state.
Android 12+ Bluetooth device inspection requires runtime BLUETOOTH_CONNECT and, when scanning is needed, BLUETOOTH_SCAN permission.
Even provides device connection events in its SDK for supported glasses; G1 community implementations also expose BLE connection and wear-state signals. The supported path for the exact glasses model must be confirmed before implementation.
A public, reliable Galaxy Buds in-ear sensor API has not yet been verified. Connected/available/selected state is feasible; in-ear state must remain unknown unless a supported API is proven on Dan’s device.
Create an Android companion layer that publishes a normalized device-context snapshot to the Hermeven client/bridge. Keep display destination and audio destination separate: Even glasses are a HUD destination and should not be treated as an audio output unless future hardware explicitly supports it.
Observation timestamp and capability/source metadata so stale or inferred state is visible
Initial routing policy to validate with Dan:
Preserve an explicit user-selected/system-selected route.
When Android Auto is active and is the selected media/communication route, speak through the car.
Otherwise, when a headset is selected, speak through the headset.
Otherwise, use the phone.
Never force a route solely because a device is paired or connected.
Safety and lifecycle requirements
Do not start unsolicited audio when Android Auto connects; spoken output must follow a user-initiated or explicitly authorized interaction.
Do not require location permission when Android’s neverForLocation Bluetooth mode is sufficient.
Request only the Bluetooth/audio permissions actually needed and degrade to unknown when denied.
Register and unregister callbacks with the owning lifecycle; reconnect cleanly after process death, Bluetooth toggles, or Android Auto disconnects.
Preserve Android/user route overrides and clear any communication-device selection at the end of a voice session.
Do not capture microphone audio outside an active, visible/authorized voice interaction.
Do not log device addresses, transcript content, or other unnecessary identifiers.
Testable acceptance criteria
On a supported Android phone, connecting and disconnecting Android Auto changes the normalized car state without restarting Hermeven.
Connecting/disconnecting Galaxy Buds changes availability state, and selecting/deselecting them changes active-route state.
The UI/debug surface reports wear_unknown rather than guessing when no supported in-ear API exists.
Connecting/disconnecting the Even glasses updates glasses state; wear state is reported only when verified by a supported device signal.
A user-initiated test utterance plays through the currently selected car, headset, or phone route and the observed route is recorded without sensitive identifiers.
Route changes during playback recover predictably without duplicate playback or a stuck communication route.
Permission denial and Bluetooth/Android Auto loss produce an explicit degraded state rather than a crash.
Automated tests cover normalization, priority/fallback policy, stale observations, duplicate callbacks, and disconnect/reconnect transitions.
Real-device evidence records phone model/Android version, Android Auto mode, Buds model, glasses model/firmware, expected route, and observed route.
Decisions required before implementation
Confirm Dan’s phone/Android version, Galaxy Buds model, and Even glasses model/firmware.
Decide whether the Android component extends the current Hermeven client or is a separate companion app/service.
Confirm whether spoken responses use media playback, a communication/VoIP session, Android TTS, or a combination; Android exposes different routing controls for each.
Confirm the desired behavior when Android Auto is connected but earbuds are explicitly selected.
Determine whether a supported Galaxy Buds in-ear signal is available on the target phone; otherwise accept wear_unknown.
Gate
This issue records an approved backlog request only. It does not start implementation or authorize merge, deployment, production activation, background microphone use, or automatic playback while driving. Source changes require an isolated branch/worktree and independent review before any merge or deployment decision.
## Request / problem
Add a small native Android companion capability so Hermeven can determine the relevant device context before producing spoken output:
- whether Android Auto projection is active;
- which audio outputs are connected and which route is actually selected;
- whether Galaxy Buds or another Bluetooth headset is available/active;
- whether the Even glasses are connected and, where supported, being worn;
- whether audio should remain on the phone as the fallback.
The system must distinguish “connected,” “available,” “selected for output,” and “worn.” It must not claim that earbuds or glasses are being worn merely because Bluetooth is connected.
## Verified current state
Current-state inspection is pinned to `main` at `f02715fb6487f4e2ff0adeccfaad2403e1724aa5`.
The current Hermeven tree has browser/TypeScript client and bridge layers, but no Android-native audio-route or Android Auto integration was found.
Android exposes the core signals needed for a companion implementation:
- `androidx.car.app.connection.CarConnection` reports Android Auto projection using `CONNECTION_TYPE_PROJECTION`.
- `AudioManager` and `AudioDeviceCallback` expose connected output-device changes and communication-device state.
- Android 12+ Bluetooth device inspection requires runtime `BLUETOOTH_CONNECT` and, when scanning is needed, `BLUETOOTH_SCAN` permission.
- Even provides device connection events in its SDK for supported glasses; G1 community implementations also expose BLE connection and wear-state signals. The supported path for the exact glasses model must be confirmed before implementation.
- A public, reliable Galaxy Buds in-ear sensor API has not yet been verified. Connected/available/selected state is feasible; in-ear state must remain unknown unless a supported API is proven on Dan’s device.
Primary references:
- https://developer.android.com/reference/androidx/car/app/connection/CarConnection
- https://developer.android.com/reference/android/media/AudioManager
- https://developer.android.com/reference/android/media/AudioDeviceCallback
- https://developer.android.com/develop/connectivity/bluetooth/bt-permissions
- https://hub.evenrealities.com/docs/enterprise/connect
## Proposed behavior
Create an Android companion layer that publishes a normalized device-context snapshot to the Hermeven client/bridge. Keep display destination and audio destination separate: Even glasses are a HUD destination and should not be treated as an audio output unless future hardware explicitly supports it.
Suggested normalized state:
- Android Auto: `not_connected | projection_active | native_automotive`
- Output device: stable identifier, Android device type, display name where permission allows, and `connected/available`
- Active route: `car | bluetooth_headset | phone | other | unknown`
- Even glasses: `disconnected | connected | worn | not_worn | wear_unknown`
- Earbuds: `disconnected | connected | selected | worn | not_worn | wear_unknown`
- Observation timestamp and capability/source metadata so stale or inferred state is visible
Initial routing policy to validate with Dan:
1. Preserve an explicit user-selected/system-selected route.
2. When Android Auto is active and is the selected media/communication route, speak through the car.
3. Otherwise, when a headset is selected, speak through the headset.
4. Otherwise, use the phone.
5. Never force a route solely because a device is paired or connected.
## Safety and lifecycle requirements
- Do not start unsolicited audio when Android Auto connects; spoken output must follow a user-initiated or explicitly authorized interaction.
- Do not require location permission when Android’s `neverForLocation` Bluetooth mode is sufficient.
- Request only the Bluetooth/audio permissions actually needed and degrade to `unknown` when denied.
- Register and unregister callbacks with the owning lifecycle; reconnect cleanly after process death, Bluetooth toggles, or Android Auto disconnects.
- Preserve Android/user route overrides and clear any communication-device selection at the end of a voice session.
- Do not capture microphone audio outside an active, visible/authorized voice interaction.
- Do not log device addresses, transcript content, or other unnecessary identifiers.
## Testable acceptance criteria
- On a supported Android phone, connecting and disconnecting Android Auto changes the normalized car state without restarting Hermeven.
- Connecting/disconnecting Galaxy Buds changes availability state, and selecting/deselecting them changes active-route state.
- The UI/debug surface reports `wear_unknown` rather than guessing when no supported in-ear API exists.
- Connecting/disconnecting the Even glasses updates glasses state; wear state is reported only when verified by a supported device signal.
- A user-initiated test utterance plays through the currently selected car, headset, or phone route and the observed route is recorded without sensitive identifiers.
- Route changes during playback recover predictably without duplicate playback or a stuck communication route.
- Permission denial and Bluetooth/Android Auto loss produce an explicit degraded state rather than a crash.
- Automated tests cover normalization, priority/fallback policy, stale observations, duplicate callbacks, and disconnect/reconnect transitions.
- Real-device evidence records phone model/Android version, Android Auto mode, Buds model, glasses model/firmware, expected route, and observed route.
## Decisions required before implementation
- Confirm Dan’s phone/Android version, Galaxy Buds model, and Even glasses model/firmware.
- Decide whether the Android component extends the current Hermeven client or is a separate companion app/service.
- Confirm whether spoken responses use media playback, a communication/VoIP session, Android TTS, or a combination; Android exposes different routing controls for each.
- Confirm the desired behavior when Android Auto is connected but earbuds are explicitly selected.
- Determine whether a supported Galaxy Buds in-ear signal is available on the target phone; otherwise accept `wear_unknown`.
## Gate
This issue records an approved backlog request only. It does not start implementation or authorize merge, deployment, production activation, background microphone use, or automatic playback while driving. Source changes require an isolated branch/worktree and independent review before any merge or deployment decision.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Request / problem
Add a small native Android companion capability so Hermeven can determine the relevant device context before producing spoken output:
The system must distinguish “connected,” “available,” “selected for output,” and “worn.” It must not claim that earbuds or glasses are being worn merely because Bluetooth is connected.
Verified current state
Current-state inspection is pinned to
mainatf02715fb6487f4e2ff0adeccfaad2403e1724aa5.The current Hermeven tree has browser/TypeScript client and bridge layers, but no Android-native audio-route or Android Auto integration was found.
Android exposes the core signals needed for a companion implementation:
androidx.car.app.connection.CarConnectionreports Android Auto projection usingCONNECTION_TYPE_PROJECTION.AudioManagerandAudioDeviceCallbackexpose connected output-device changes and communication-device state.BLUETOOTH_CONNECTand, when scanning is needed,BLUETOOTH_SCANpermission.Primary references:
Proposed behavior
Create an Android companion layer that publishes a normalized device-context snapshot to the Hermeven client/bridge. Keep display destination and audio destination separate: Even glasses are a HUD destination and should not be treated as an audio output unless future hardware explicitly supports it.
Suggested normalized state:
not_connected | projection_active | native_automotiveconnected/availablecar | bluetooth_headset | phone | other | unknowndisconnected | connected | worn | not_worn | wear_unknowndisconnected | connected | selected | worn | not_worn | wear_unknownInitial routing policy to validate with Dan:
Safety and lifecycle requirements
neverForLocationBluetooth mode is sufficient.unknownwhen denied.Testable acceptance criteria
wear_unknownrather than guessing when no supported in-ear API exists.Decisions required before implementation
wear_unknown.Gate
This issue records an approved backlog request only. It does not start implementation or authorize merge, deployment, production activation, background microphone use, or automatic playback while driving. Source changes require an isolated branch/worktree and independent review before any merge or deployment decision.