| .. | .. |
|---|
| 285 | 285 | void didChangeAppLifecycleState(AppLifecycleState state) { |
|---|
| 286 | 286 | switch (state) { |
|---|
| 287 | 287 | case AppLifecycleState.paused: |
|---|
| 288 | | - case AppLifecycleState.inactive: |
|---|
| 289 | 288 | case AppLifecycleState.detached: |
|---|
| 290 | 289 | AudioService._isBackgrounded = true; |
|---|
| 291 | 290 | case AppLifecycleState.resumed: |
|---|
| 292 | 291 | AudioService._isBackgrounded = false; |
|---|
| 292 | + // AppLifecycleState.inactive is transient (Android push wake-up, system |
|---|
| 293 | + // dialogs, app switcher preview) — the app is still visible. Treating it |
|---|
| 294 | + // as backgrounded silently blocked auto-play of incoming voice on Android, |
|---|
| 295 | + // where `inactive` fires more often around MQTT push delivery. Leave the |
|---|
| 296 | + // current value untouched so a real paused/resumed edge governs it. |
|---|
| 293 | 297 | default: |
|---|
| 294 | 298 | break; |
|---|
| 295 | 299 | } |
|---|