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
In my app the notification doesn't usually stick around after close(though sometimes it will on different devices), however the same crash could be triggered by headphone media control & adb keyevent(adb shell input keyevent 85)
Expected result
Media playback and service stops.
Actual result
Media playback stops but service does not or is recreated(?)
Notification player still persists with broken controls, need to launch app and play something to fix.
FATAL EXCEPTION: main
Process: androidx.media3.demo.session, PID: 1795
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{7f58c5c u0 androidx.media3.demo.session/.PlaybackService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2020)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7719)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Media
Any in demo-session
Bug Report
You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
The text was updated successfully, but these errors were encountered:
I assume you can't stop your service because there still is an connected controller bound to your service. @marcbaechinger is probably able to confirm that or provide a better explanation.
I assume you can't stop your service because there still is an connected controller bound to your service. @marcbaechinger is probably able to confirm that or provide a better explanation.
Still in the demo-session app, by logging the mediaLibrarySession.connectedControllers on each onGetSession and onTaskRemoved I get:
onGetSession: androidx.media3.session.MediaLibraryService$MediaLibrarySession@25a13e [] <-- Initial open
onGetSession: androidx.media3.session.MediaLibraryService$MediaLibrarySession@25a13e [ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}, ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}] <-- Open Artist folder
onGetSession: androidx.media3.session.MediaLibraryService$MediaLibrarySession@25a13e [ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}, ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}] <-- Play track
onGetSession: androidx.media3.session.MediaLibraryService$MediaLibrarySession@25a13e [ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}, ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}]
onTaskRemoved: androidx.media3.session.MediaLibraryService$MediaLibrarySession@25a13e [ControllerInfo {pkg=androidx.media3.demo.session, uid=10168}, ControllerInfo {pkg=com.android.systemui, uid=10113}] <-- Close app
onGetSession: androidx.media3.session.MediaLibraryService$MediaLibrarySession@4a13899 [] <-- Immediately after close
onGetSession: androidx.media3.session.MediaLibraryService$MediaLibrarySession@e5d8e2f [] <-- Play from notification a few seconds later and crashes in background
So it's spinning up a new session immediately after close but not enough time/interaction to see what controllers are connected. Then another session again on trying to play from the notification but crashes before any controller info can be captured.
On an emulator or Pixel device I see nothing after the onTaskRemoved.
Version
Media3 1.5.1
More version details
No response
Devices that reproduce the issue
Amazon Fire HD 10 (13th Gen) (OS 11)
Alcatel 1 (OS 11)
Devices that do not reproduce the issue
Pixel 6a (OS 15)
Samsung Flip 5 (OS 15)
Reproducible in the demo app?
Yes
Reproduction steps
To reproduce with the demo app requires a small modification.
This would need added to the
DemoPlaybackService
Then:
In my app the notification doesn't usually stick around after close(though sometimes it will on different devices), however the same crash could be triggered by headphone media control & adb keyevent(
adb shell input keyevent 85
)Expected result
Media playback and service stops.
Actual result
Media playback stops but service does not or is recreated(?)
Notification player still persists with broken controls, need to launch app and play something to fix.
Media
Any in demo-session
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: