Closed bruco1987 closed 1 year ago
Can you try a dependency override with audio_service branch fix/oppo_android_13
?
Could you tell me how to do it? So I test it
Could you tell me how to do it? So I test it
In your pubspec.yaml
:
dependency_overrides:
audio_service:
git:
url: https://github.com/ryanheise/audio_service.git
path: audio_service
ref: fix/oppo_android_13
Ok perfect I'll try and let you know.
Inviato da Outlook per Androidhttps://aka.ms/AAb9ysg
From: ryanheise @.> Sent: Sunday, September 10, 2023 1:46:36 PM To: ryanheise/just_audio @.> Cc: bruco1987 @.>; Author @.> Subject: Re: [ryanheise/just_audio] application crash using just_audio_background (Issue #1056)
In your pubspec.yaml:
dependency_overrides: audio_service: git: url: https://github.com/ryanheise/audio_service.git path: audio_service ref: fix/oppo_android_13
— Reply to this email directly, view it on GitHubhttps://github.com/ryanheise/just_audio/issues/1056#issuecomment-1712792149, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD5U3DFL7OJE6HEN6RMZ2V3XZWSBZANCNFSM6AAAAAA4SC72XI. You are receiving this because you authored the thread.Message ID: @.***>
p
Nel tuo
pubspec.yaml
:dependency_overrides: audio_service: git: url: https://github.com/ryanheise/audio_service.git path: audio_service ref: fix/oppo_android_13
perfect now it works correctly... is this a temporary solution? will it be fixed with the next update or should I leave it on pubspec?
Well I'm not sure yet whether this is the right solution, and so maybe you could help me test a few more scenarios on the Oppo device to be sure.
First of all, what happens when you rebuild your app with targetSdkVersion 32
instead of 33? In the notification for older versions of Android, you should be able to switch between the expanded and compact view, where the expanded view has 4 buttons and the compact view has only 3 buttons. But this "fix" changes the logic a bit to avoid the Oppo incompatibility so I'd like to know if the compact view is still working.
If your own app doesn't have a playlist, you won't get all 4 buttons because there won't be a previous or next button, so if that's the case you'd need to test the official just_audio_background example and jump to one of the tracks in the middle of the playlist so that you definitely can see both the previous and next buttons, as well as 2 more buttons in the expanded view, or just 1 more in the compact view.
Actually, scratch that test since we really should be targeting at least 33. What I was really interested in testing was Oppo with an older version of Android (e.g. 12 or earlier) but that is not as easy to test unless you happen to have another Oppo phone with an older version of Android.
The fix mentioned above has now been published. You can change your pubspec back to how it was, but run flutter pub upgrade
to ensure you are getting the latest update to the transitive dependency audio_service
. Thanks for reporting the bug.
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? I am making an application in flutter and I need to play an audio file in the background...(more like I need the notification that the audio player creates). Until yesterday it was working perfectly. I would initialize just_audio_background, create the MediaItems as the official guide shows me, and when I would play the player the notification would appear correctly. Since today, however, on my oneplus 8t when the song is supposed to start, the app crashes
Minimal reproduction project "THE EXAMPLE"
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
Error messages - from application bulding to error
Expected behavior I would expect the audio playback notification to appear
Screenshots no screenshot
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Additional context https://stackoverflow.com/questions/77004344/application-crash-using-just-audio-background