Closed NaagAlgates closed 3 years ago
Did you mean to open this issue on the audio_service repo?
Yes. :)
Add this code below inside main.dart
@override
void dispose() {
_audioHandler.customAction("dispose");
super.dispose();
}
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.paused) {
_audioHandler.stop();
}
}
Hello @ryanheise, Thank you for your amazing work.
Possible Bug / A question:
To Reproduce Steps to reproduce the behavior:
Expected behavior Ideally, the notification should be removed and the audio should stop playing on killing the main app.
Minimal reproduction project Code to reproduce: https://github.com/suragch/flutter_audio_service_demo
audio_service version:
0.18
Flutter SDK version
Device: Moto G, Pixel 3XL Android version: 7, 11
Screenshot:
![image](https://user-images.githubusercontent.com/14884575/127583023-889697c7-5644-41d1-84da-9a48afa68f34.png)
If there is a solution already, please excuse and request you to share the link or minimal code.