Bluetooth Button Resume Requires Multiple Clicks on Android

Hi there, thank you very much for Plexamp! Really changed the way I handle my music.

Have a small problem where, upon pausing music with any Bluetooth device, if I press the button again it does nothing. It will continue to do nothing until I wait about 10 seconds then press the button again.

Problem with that is that if I have a headphone which pauses automatically when taking off the headphones, the system still thinks I’m listening to music although the music is off already. No other apps (e.g. YouTube) exhibit this problem - all pause and start music instantaneously.

Would like to share logs but unfortunately have an error in Plexamp that’s preventing me from exporting logs. Noted on the following devices:

  • Samsung S23
  • Samsung S24 Ultra

With the following BT devices:

  • Bose QC Ultra Headphones
  • Sony WH-1000XM3
  • Fiio BTR15

A similar occurrence happened here: Reddit - Dive into anything

I’m sorry for that frustrating combination of issues. Samsung devices have proven to be problematic for us over the years in a number of ways. We’ve never managed to reproduce the issue saving logs, is it possible the app lacks a permission it should have? Do you have access to getting ADB logs off the device?

I just reset the app completely, logs are working now!

Plexamp.log (271.9 KB)

OK, getting some helpful logs. I see a resume event near the end:

Dec 28, 2024 15:48:00.023 [Javascript] DEBUG - [PlayerService] Got a media button 126.
Dec 28, 2024 15:48:00.023 [Javascript] DEBUG - [PlayerService] Media button 126 received in local state paused
Dec 28, 2024 15:48:00.023 [Javascript] INFO - [MediaSession] Sending onPlay event
Dec 28, 2024 15:48:00.048 [0xf9723cb0] INFO - BASS: Resume.

Processed quickly; then I see a pause event:

Dec 28, 2024 15:48:09.514 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state playing
Dec 28, 2024 15:48:09.514 [Javascript] INFO - [MediaSession] Sending onPause event.
Dec 28, 2024 15:48:09.531 [0xf7973cb0] INFO - BASS: Pause.

Note that it’s processed nearly instantly.

I will need more of an explanation of what you’re doing compared to the logs to be able to figure out what’s going on.

Thanks for the quick reply, really appreciate it.

Here’s what I was doing:

I played a song by pressing on the Play button. I then, with my BT device, press the play/pause button. Player is now paused. I then proceed to keep pressing it every second until it resumes again (about 10 clicks).

The pause is immediate - it’s the resume which is delayed significantly. Problem with that is that with BT devices that automatically pause when I take the headset off, it doesn’t resume properly right now.

Hmm, I’m still trying to correlate those logs with what you’re saying:

Dec 28, 2024 15:43:27.345 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state playing
Dec 28, 2024 15:43:29.944 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Dec 28, 2024 15:43:35.888 [Javascript] DEBUG - [PlayerService] Media button 126 received in local state paused
Dec 28, 2024 15:43:38.398 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state playing
Dec 28, 2024 15:43:40.248 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Dec 28, 2024 15:43:47.009 [Javascript] DEBUG - [PlayerService] Media button 126 received in local state paused
Dec 28, 2024 15:47:51.639 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state playing
Dec 28, 2024 15:47:53.950 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Dec 28, 2024 15:48:00.023 [Javascript] DEBUG - [PlayerService] Media button 126 received in local state paused
Dec 28, 2024 15:48:00.738 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state playing
Dec 28, 2024 15:48:04.427 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Dec 28, 2024 15:48:08.650 [Javascript] DEBUG - [PlayerService] Media button 126 received in local state paused
Dec 28, 2024 15:48:09.514 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state playing

127 = pause, 126 = play

I don’t see ~ten events, one per second.

That’s the interesting thing, it’s not capturing it for some reason and I’m not sure why. I can take a video of me showing you what I’m doing as proof instead.

EDIT: managed to get it logged this time.
Plexamp.log (167.3 KB)
Refer to Jan 03, 2025 12:12:42.437 onwards:

Jan 03, 2025 12:12:42.437 [Javascript] DEBUG - [PlayerService] Got a media button 127.
Jan 03, 2025 12:12:42.437 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Jan 03, 2025 12:12:42.437 [Javascript] INFO - [MediaSession] Sending onPause event.

Jan 03, 2025 12:12:43.734 [Javascript] DEBUG - [PlayerService] Got a media button 127.
Jan 03, 2025 12:12:43.734 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Jan 03, 2025 12:12:43.734 [Javascript] INFO - [MediaSession] Sending onPause event.

Jan 03, 2025 12:12:44.909 [Javascript] DEBUG - [PlayerService] Got a media button 127.
Jan 03, 2025 12:12:44.909 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Jan 03, 2025 12:12:44.909 [Javascript] INFO - [MediaSession] Sending onPause event.

Jan 03, 2025 12:12:46.051 [Javascript] DEBUG - [PlayerService] Got a media button 127.
Jan 03, 2025 12:12:46.051 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Jan 03, 2025 12:12:46.051 [Javascript] INFO - [MediaSession] Sending onPause event.

Jan 03, 2025 12:12:47.136 [Javascript] DEBUG - [PlayerService] Got a media button 127.
Jan 03, 2025 12:12:47.137 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Jan 03, 2025 12:12:47.137 [Javascript] INFO - [MediaSession] Sending onPause event.

Jan 03, 2025 12:12:48.026 [Javascript] DEBUG - [PlayerService] Got a media button 127.
Jan 03, 2025 12:12:48.027 [Javascript] DEBUG - [PlayerService] Media button 127 received in local state paused
Jan 03, 2025 12:12:48.027 [Javascript] INFO - [MediaSession] Sending onPause event.

We don’t get an onPlay event until 12:12:49:

Jan 03, 2025 12:12:49.241 [Javascript] DEBUG - [PlayerService] Got a media button 126.
Jan 03, 2025 12:12:49.241 [Javascript] DEBUG - [PlayerService] Media button 126 received in local state paused
Jan 03, 2025 12:12:49.241 [Javascript] INFO - [MediaSession] Sending onPlay event

Thanks for the assist with the analysis!

I think what we might be seeing is an annoying thing we see on Android where it’s unclear whether sending a pause when already paused should resume or not.

We’ve changed the behavior a bit over the years based on people reporting abnormal behavior, and now have sampled it to: pause key always pauses, play key always resumes, and the “play/pause” key toggles.

It looks like your device sends pause a bunch of times when paused in an attempt to resume, and then eventually sends a play?

I would say that, except that it doesn’t do it for any other app, including Spotify, YouTube and even the Plex regular app works perfectly fine.

I think what might be happening is that the system thinks Plexamp might still be plahing even when paused - I noticed that other apps show a pause symbol for Plexamp. See attached video in zip file - I pressed the play/pause button once to transition from play to pause (thus the symbols being reversed) - notice how the symbol switches back immediately. I then press the play/pause button a few more times, and the system refuses to play until I wait about 10s or so.

Screen_Recording_20250104_093430_Bose.zip (289.1 KB)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.