Closed Devansh8086 closed 3 weeks ago
Here's the relevant Java code:
private void enterPlayingState() {
ContextCompat.startForegroundService(this, new Intent(AudioService.this, AudioService.class));
if (!mediaSession.isActive())
mediaSession.setActive(true);
acquireWakeLock();
mediaSession.setSessionActivity(contentIntent);
internalStartForeground();
}
private void internalStartForeground() {
startForeground(NOTIFICATION_ID, buildNotification());
notificationCreated = true;
}
As you can see, startForeground
is called unconditionally following every call to startForegroundService
unless some OTHER exception is occurring between the first and the second call. Since you didn't report any other exception happening between those two calls, I suspect there is something inconsistent with your report. Maybe either you are not using "the example" or maybe the reproduction steps are not exactly accurate?
same issue face
Just looking at the error message, it seems to be reporting an error in a different audio plugin (com.dooboolab.TauEngine.FlautoBackgroundAudioService
). Please report the bug to that project.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.
Which API doesn't behave as documented, and how does it misbehave? When using the notification pause button on Android the music stops after few minutes and app is getting crashed/closed automatically but this is not happening in all the devices (perfectly working in Samsung M12 - Android 13, moto e13 - Android 13).
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:
Error messages
Expected behavior Music must stop.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Device: Redmi note 8 pro
OS: Android 11
Device: Redmi 9i
OS: Android 10
Device: Tecno LE6
OS: Android 11
Flutter SDK version
Additional context AndroidManifest.xml