PaulWoitaschek / Voice

Minimalistic audiobook player
GNU General Public License v3.0
2.38k stars 369 forks source link

Notification Bar Media Control does not restart playback #2110

Open newhinton opened 1 year ago

newhinton commented 1 year ago

Overview

When leaving voice stopped for a while, the playback notification does not resume playback.

A homescreen widget however, does resume playback.

This might be a device specific bug.

How to reproduce

  1. Stop playback and leave device.
  2. Start playback via notification area

Version

8.1.3

Android Version

Android 13, GrapheneOS

Device Model

Pixel 7

eternal-sorrow commented 1 year ago

The same problem here. Sony Xperia XA2, Android 12, Lineage OS. I don't think it's device-specific.

deadcombo commented 11 months ago

Interestingly I've a 7 Pro with GOS and also face this. I do get a crash pop-up. Fortunately it's easy for us to get logs now.

type: ANR
osVersion: google/cheetah/cheetah:13/TQ3A.230901.001/2023100300:user/release-keys
package: de.ph1b.audiobook:3603030
process: de.ph1b.audiobook
installer: dev.imranr.obtainium

activity: null
cause: ANR Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{36c2614 u0 de.ph1b.audiobook/voice.playback.session.PlaybackService}
info: ANR in de.ph1b.audiobook
PID: 9394
Reason: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{36c2614 u0 de.ph1b.audiobook/voice.playback.session.PlaybackService}
ErrorId: 4575b2c4-ab52-4821-8725-6bbe3dfbd6fc
Frozen: false
Load: 2.37 / 2.05 / 1.88
----- Output from /proc/pressure/memory -----
some avg10=0.48 avg60=0.13 avg300=0.02 total=61293475
full avg10=0.48 avg60=0.13 avg300=0.02 total=37536773
----- End output from /proc/pressure/memory -----

I often face a very big delay using my earphones' button to unpause Voice, not sure whether that's related.

newhinton commented 10 months ago

I have got a different error captured with logcat:

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:1400)
    at com.android.server.media.MediaSessionRecord$ControllerStub.play(MediaSessionRecord.java:1735)
    at android.media.session.ISessionController$Stub.onTransact(ISessionController.java:523)
    at android.os.Binder.execTransactInternal(Binder.java:1373)
    at android.os.Binder.execTransact(Binder.java:1299)

Maybe the two issues are different

newhinton commented 3 months ago

This seems to be an widespread issue, not nessessarily related to specific apps.

See this similar issue in antennapod: https://github.com/AntennaPod/AntennaPod/issues/6576

Someone suggested that media3 would fix this, but that hasn't been confirmed.