Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] (Android) Volume doesn't reset when shake to reset sleep timer #626

Closed
1 of 2 tasks
YodaDaCoda opened this issue Mar 12, 2023 · 11 comments
Closed
1 of 2 tasks
Labels
bug Something isn't working

Comments

@YodaDaCoda
Copy link

Steps to reproduce

  1. Play an audiobook and wait for the sleep timer to count down.
  2. When the volume starts to lower, shake the phone to reset the timer.
  3. Observe that the book continues playing at reduced volume.

Expected behaviour

  • The volume should be restored when the phone is shaken to reset the timer

Actual behaviour

  • The volume is not restored, and the audiobook continues playing at reduced volume

Environment data

Audiobookshelf Version: 0.9.63-beta

  • Android App?
  • iOS App?

Android Issue

Android version: 13

Device model: OnePlus 9 (LE2115)

Stock or customized system: Stock

iOS Issue

iOS Version:

iPhone model:

@YodaDaCoda YodaDaCoda added the bug Something isn't working label Mar 12, 2023
@brcarls
Copy link

brcarls commented Mar 19, 2023

I have noticed that if I manually increase the volume using my phone's volume slider to compensate for the partially faded volume, the next time the sleep timer starts to fade, it first goes back to full volume and then fades from there.

@advplyr
Copy link
Owner

advplyr commented Mar 19, 2023

I'm not able to reproduce this.

I set the sleep timer to 1 minute then with around 10 seconds remaining I shake the phone. The volume resets properly.

Can you reproduce this every time? Are you using chromecast?

@YodaDaCoda
Copy link
Author

Interesting...

Test 1:
1min timer.
Watched it count down.
Noticed the sound lowering with about 20s remaining.
Shook the phone at 10s remaining and observed the timer reset & volume went back up.

Test 2:
1min timer.
Started playback, then turned screen off.
Using timer on laptop, observed sound lowering around 20s remaining.
Shook the phone at about 10s remaining and observed volume went back up.

Test 3:
5min timer.
Started playback, then turned screen off.
Using timer on laptop, observed sound lowering around 30s remaining.
Shook the phone at about 10s remaining and observed playback continuing at reduced volume.
Turned phone back on, observed timer reset to 5min.
Pressed pause/play & observed playback back at full volume.

Seems like the sleep duration somehow impacts whether the volume is restored.

@YodaDaCoda
Copy link
Author

Further to my last: turned off restricting battery usage for the app & it restores volume when shaken.

@advplyr
Copy link
Owner

advplyr commented Mar 23, 2023

Thanks for testing. The battery optimization on some devices is closing background processes and causing some strange results. I think we'll have to put an alert in the app about this. There is a feature request for that already.

@YodaDaCoda
Copy link
Author

I still have battery optimisation turned off for abs but last night experienced the same thing with the volume not restoring. Even if it is a battery optimisation thing, can't that be worked around? I have used Smart Audiobook Player for many years & it rests the volume without having to disable battery optimisation.

@advplyr advplyr reopened this Mar 23, 2023
@advplyr
Copy link
Owner

advplyr commented Mar 23, 2023

If it happened with battery optimization turned off then it is not battery optimization. I haven't reproduced this and can't think of how this would be possible

@YodaDaCoda
Copy link
Author

Yeah I thought it was odd. Is there any additional testing I can do?

@brcarls
Copy link

brcarls commented Mar 25, 2023

I'm on android 12 Samsung S10e OneUI 4.1 Same symptoms as YodaDaCoda, 100% reproduceable.

I use a 15 min sleep timer. Hitting pause and then play will restore the volume.

If instead of pause/play, I increase volume to compensate, then next time the timer starts to expire, the volume suddenly gets very loud, then starts to fade.

Turning off battery optimization did not help. (I set battery to "Unrestricted" for this app)

@advplyr
Copy link
Owner

advplyr commented Mar 25, 2023

Thanks all for the testing. I did end up reproducing this and it will be fixed in the next release

@advplyr
Copy link
Owner

advplyr commented May 23, 2023

Fixed in v0.9.64-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants