You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2022. It is now read-only.
I am trying to play, play list. I am trying to store the last played audio and position and trying to seek with the following :
final Result result = await _audioPlayer.playAll(
urls,
index: index,
position: duration,
repeatMode: false,
respectAudioFocus: true,
playerMode: PlayerMode.BACKGROUND,
audioNotifications: audioNotifications,
);
it works on the debug mode. but on release mode(apk), it fails with the following error. Please let me know how to fix this issue. any insight will be very helpful.
17336
Reason: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{ad023f4 u0 com.xyz.pyx/danielr2001.audioplayer.audioplayers.ForegroundAudioPlayer}
Load: 1.82 / 1.82 / 2.19
CPU usage from 0ms to 6715ms later (2020-03-04 19:25:40.086 to 2020-03-04 19:25:46.801) with 99% awake:
The text was updated successfully, but these errors were encountered:
I made an update of the starting position, it wasn't even implemented (i forgot about it). :D
but the release crash is happening to me too, but it happens with all the players even if not using the start position. That's is very strange.
I am working around the issue by letting the first audio play for a second and skipping to the index where I want as of now :-) I know it is ugly. but I am kinda in rush to fix the defect and move on. When I get sometime, I will definitely try to contribute this project. Appreciate your support..
First of all, the library is great @danielR2001 . Many thanks.
In the production version of our app which is being used by thousands of users, two main crash clusters (related to this library) were observed - (1) Null pointer exceptions in ForegroundPlayer startcommand and (2) RemoteServiceExceptions like the one mentioned above.
(1) were resolved by simply checking for null values, wherever possible and appropriately returning sticky & non_sticky in the startcommand function
(2) was a bit more complicated. We ended up over-riding the onCreate function and calling startForeground() from onCreate as well.
Would love to contribute these changes to the library.
@danielR2001
I am trying to play, play list. I am trying to store the last played audio and position and trying to seek with the following :
it works on the debug mode. but on release mode(apk), it fails with the following error. Please let me know how to fix this issue. any insight will be very helpful.
17336
Reason: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{ad023f4 u0 com.xyz.pyx/danielr2001.audioplayer.audioplayers.ForegroundAudioPlayer}
Load: 1.82 / 1.82 / 2.19
CPU usage from 0ms to 6715ms later (2020-03-04 19:25:40.086 to 2020-03-04 19:25:46.801) with 99% awake:
The text was updated successfully, but these errors were encountered: