audio_service
audio_service copied to clipboard
Notification stays even after stopping for a brief time
Which API doesn't behave as documented, and how does it misbehave? Notification does not get cleared as soon as i tap stop on the notification. I have now successfully able to integrate all the three packages. only issue im facing is when i tap on the stop icon on the notification the audio stops but notification stays there for a brief period of time and then disappear. same happens when i swipe it it comes back and go. what i saw is when i stop it the player goes into buffering state again. Just wanted to know is it normal behaviour.
Minimal reproduction project Provide a link here using one of two options: The Example
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
- Play the Audio
- Go to notification and stop
Error messages
NA
Expected behavior A clear and concise description of what you expected to happen.
Screenshots https://drive.google.com/file/d/1-0d7Em5KyedQjU2iHCet3IsEDYVC85o4/view?usp=drivesdk Here is a screen record from the example app.
Runtime Environment (please complete the following information if relevant):
- Device: Poco F1
- OS: Android 10
Flutter SDK version
➜ flutter doctor --verbose
[✓] Flutter (Channel stable, 1.20.3, on Linux, locale en_IN)
• Flutter version 1.20.3 at /home/ashish/flutter_linux/flutter
• Framework revision 216dee60c0 (9 days ago), 2020-09-01 12:24:47 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /home/ashish/Android/Sdk
• Platform android-30, build-tools 30.0.1
• ANDROID_HOME = /home/ashish/Android/Sdk
• Java binary at: /home/ashish/Downloads/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Android Studio (version 4.0)
• Android Studio at /home/ashish/Downloads/android-studio
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• POCO F1 (mobile) • 75009d9e • android-arm64 • Android 10 (API 29)
• No issues found!
Additional context NA
It'd be interesting to do some profiling to see whether the main thread is being blocked when the FlutterEngine is being shut down. Although if that is where it's happening, then it is possible this issue will go away after #415 is resolved.
I/ExoPlayerImpl( 678): Release 338d64 [ExoPlayerLib/2.11.7] [beryllium, POCO F1, Xiaomi, 29] [goog.exo.core]
W/FlutterJNI( 678): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 80
This is the log im getting on Stop from notification
@ashishfeels I'm not sure if that is the cause, although there is a different issue open for that error message.
@ryanheise cool , i didn't knew , i was using @stonega podcast app but i saw that this issue do not happen there, he also have no idea how.
Is expected to have a notification even after a "STOP" call? If so, how can I delete the notification completely?
Right now, when I stop, it triggers a "notification closed" event, but the notification is still there. Seems that it just loose its foreground property.
The notification should disappear unless you're using some versions of Android 11 - if the latter, search past issues for Android 11 notifications to learn more.
this happened to me long back need to check again as im moving my whole app to flutter will eventually test this again. last time it was a POC.
same happens on iOS, even if I dispose the player
@nzackoya can you open a new issue for the iOS bug, since this one is an Android issue?