ryanheise / audio_service

Flutter plugin to play audio in the background while the screen is off.
805 stars 480 forks source link

androidNotificationOngoing setting is ignored #1065

Closed 12people closed 8 months ago

12people commented 8 months ago

Documented behaviour

Whether the notification can be swiped away.

If you set this to true, androidStopForegroundOnPause must be true as well, otherwise this will not do anything, because when foreground service is active, it forces notification to be ongoing.

Actual behaviour

Notification can be swiped away even when the setting is false.

Minimal reproduction project

https://github.com/12people/audio_service_issue_1065

Reproduction steps

  1. Click play
  2. Swipe away the notification

    Output of flutter doctor

    
    [✓] Flutter (Channel stable, 3.19.2, on macOS 14.4 23E214 darwin-arm64, locale
    en-CZ)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2023.1)
    [✓] Connected device (3 available)
    [✓] Network resources

• No issues found!


### Devices exhibiting the bug
Device: Fairphone 3
OS: Android 13
12people commented 8 months ago

Closing, as it seems like a limitation on Android's part.

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.