Open adem74 opened 3 years ago
I have the same problem, I need urgent help
I found the solution. could you sent your wp number to ademunal741@gmail.com solution is basic but explain is hard
Telefon numaramı yolladım adem beycevap verirseniz sevinirim,çok teşekkürler
hocam mail gelmedi 0506 385 52 74 bana mesaj atar mısınız
Mesaj Attım hocam
@adem74 it will be nice to share solution with community!
I have the same problem in 2024,I've been trying to find a solution for days
it has been 4 years and still they did not solve, it is awkward. solution is as i remember adding dispose to native side of audioplayers. it took me a month to solve it.
Hello, when I close my application music does not stop, I don't lose my connection with my phone. and I got this error. "Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: xyz.luan/audioplayers. Response ID: 0" I tried what came my mind, but I could not get something
//1. @override didChangeAppLifecycleState(AppLifecycleState state) { if (AppLifecycleState.detached == state) { print("detached"); // it is working I can see this write on console. audio.player.dispose(); } } @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this);}
//2 I wrote on dispose() method but it also did not work.
//3 I wrapped my build function with "WillPopScope" but it didn't show me even print
//4 I wrote dispose method of my player page, but that too didn't show me print
//5 I added this code in initstate but it didn't show print audio.player.onPlayerError.listen((event) { print(event.toString()); print("balblalba"); }); //6 I changed code blocs with such. audioplayers-0.16.2>android>src>main>java>xyz>luan>audioplayers>AudioPlayersPlugin.java public void handleError(Player player, String message) { channel.invokeMethod("audio.onComplete", buildArguments(player.getPlayerId(), true)); // channel.invokeMethod("audio.onError", buildArguments(player.getPlayerId(), message)); }