Open marcbaechinger opened 1 year ago
Hi there @marcbaechinger!
Is this still an issue?
I am trying to fix a bug for MediaResumption that occurs on some devices. My problem occurs in the following scenario :
onPlaybackResumption
Thanks to some other comments/issues i found out that our Service seems to restart due to a crash.
I managed to fix that with the latest version 1.4.0-rc01
that contains:
pauseAllPlayersAndStopSelf()
My MediaLibraryService
does this now:
override fun onTaskRemoved(rootIntent: Intent?) {
super.onTaskRemoved(rootIntent)
logDebug("onTaskRemoved()")
pauseAllPlayersAndStopSelf()
cleanUp()
}
override fun onDestroy() {
super.onDestroy()
logDebug("onDestroy()")
cleanUp()
}
Now that i use the new function pauseAllPlayerAndStopSelf
the service does not seem to restart due to a crash anymore.
I do still have a stale notification though and i see this happening in the logs:
E Remote failure in play.
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:584)
at android.media.session.ISessionCallback$Stub$Proxy.onPlay(ISessionCallback.java:729)
at com.android.server.media.MediaSessionRecord$SessionCb.play(MediaSessionRecord.java:1408)
at com.android.server.media.MediaSessionRecord$ControllerStub.play(MediaSessionRecord.java:1743)
at android.media.session.ISessionController$Stub.onTransact(ISessionController.java:523)
at android.os.Binder.execTransactInternal(Binder.java:1339)
at android.os.Binder.execTransact(Binder.java:1275)
I found this issue while doing some digging, so i am just wondering if this is the same problem. Thanks in advance!
After i did some extra digging i decided to create an issue for the above.
I think but i am not sure if both issues are related.
Media3 Version
Media3 1.1.0-alpha01
Devices that reproduce the issue
Devices on which playback resumption results in a
KEY_EVENT_PLAY_PAUSE
(or devices with a BT device that sends this?).Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Enable playback resumption, start playback and terminate the app.
Then trigger playback resumption that results in a
KEY_EVENT_PLAY_PAUSE
.Expected result
Playback resumption is triggered (
Callback.onPlaybackResumption()
).Actual result
Only player.prepare/play is called instead
See stack trace screenshot in 27
Media
All media
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.