-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio playback interruption on Android devices #1363
Comments
We are seeing similar reports for Finamp. Related issue: jmshrv/finamp#956 |
This happened to me a few times recently and two times out of those the audio cut off suspiciously soon after I recieved a notification. Not sure if that really is something or just a coincidence but leaving this comment here anyway in case somebody else also observes it. |
Same here, player is not stopped, progress continues but there is no sound. Some users reported it happens after 5 - 6 mins. Perhaps a new energy saving feature on Android. |
@mklepaczko Now that you mentioned it, I am only seeing this on my pixel 8 after android 15 update and latest patch and the timing almost seems correct too. Can you mention which android version you are seeing this issue in? Also it'll be great if someone can test and verify if this issue is present for older package version or android versions or combo of both. |
Is anyone able to submit a minimal reproduction project to allow me to investigate? I have a Pixel 8, so I ought to be able to reproduce it if someone can provide a reproduction project. Before you do so, of course please make sure your issue either happens in the foreground, or alternatively if this is a background thing, ensure that background audio is properly configured to keep it alive. |
Hi, I had the ~ same issue, streaming stopped when the device display was closed and nothing was shown in the notification tray. The fix for me was adding the new foreground service type declaration required starting with android 14: https://developer.android.com/about/versions/14/changes/fgs-types-required
|
@marianperca good catch! We only have the issue on the stable version, not the beta version, and there really is a difference in permissions. Didn't see that in previous diffs since the branches have diverged a lot in our case. |
@marianperca Unfortunately for me it's not the solution. I have these 2 permissions in the manifest implemented since 10 months. My attempt to fix this was to set |
Which API doesn't behave as documented, and how does it misbehave?
The just_audio package for Flutter is not behaving as expected on Android devices. Specifically, the audio playback is unexpectedly stopping for some users, even though the progress bar continues to move. This behavior is not documented and appears to be a bug.
Minimal reproduction project
Unfortunately, we cannot provide a minimal reproduction project at this time as the issue is not consistently reproducible in development or release environments. It only occurs for some users in production.
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Error messages
We don't have any error in crashanalytics.
Expected behavior
The audio should play continuously without interruption for the entire duration of the audio file.
Screenshots
No screenshots are available at this time as the issue occurs randomly for users.
Desktop (please complete the following information):
N/A - This issue is specific to Android devices.
Smartphone (please complete the following information):
Flutter SDK version
Additional context
We're seeking assistance in identifying potential causes or additional debugging steps we can take to resolve this issue.
The text was updated successfully, but these errors were encountered: