ryanheise / audio_session

MIT License
107 stars 68 forks source link

devicesChangedEventStream returns empty sets on first load #101

Open adigladi opened 1 year ago

adigladi commented 1 year ago

Seems similar to #63 .

Currently when starting the app and initializing a listener to the devicesChangedEventStream, when the first event is triggered, the sets are empty. After that first event everything works as normal. E.g I start the app with no headphones, after init I plug in headphones and an event is triggered with no devices added and no devices removed. But when I plug them out, then the list shows correct added/removed devices.

Flutter doctor:


Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.3, on macOS 13.0.1 22A400 darwin-arm64, locale
    en-SE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✗] Chrome - develop for the web (Cannot find Chrome executable at
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.79.0)
[✓] VS Code (version 1.79.0-insider)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 1 category.

`Dart SDK version: 3.0.3 (stable)`
fullflash commented 1 year ago

same for me with latest plugin and sdks.

[log] AudioSessionManagerImpl.Devices added: {}
[log] AudioSessionManagerImpl.Devices removed: {}
serhii-k commented 7 months ago

Same issue here. audio_session: ^0.1.17 iOS: 15.2

Only the first event contains the empty sets.

JXWeiJun commented 3 weeks ago

Any updates on this issue?