Plexamp - Strange Samsung Phone Bug

First of all, amazing app. Thank you for providing an alternative to those of us abandoned by Google’s ham-handed transition from GPM to YT Music. I very much enjoy curating my own library again and listening to those sweet, sweet FLAC files…

This is very likely a Samsung and/or Android bug, but I wanted to confirm that and at least see if any other Plexamp users have noticed this:

On my Samsung Galayx S20 FE, with music playing in Plexamp, swiping up on the homescreen to access the apps menu causes the music to pause. This is very strange behavior and only started occurring within the last few weeks. It is also inconsistent, and I cannot reproduce it reliably. In addition to the swipe up gesture, other interactions with the app menu sometime trigger a music pause, including swiping left or right, or accessing the context menu for an app by long-pressing its icon.

My first hunch was that, in a bid to improve responsiveness, Samsung was aggressively culling background processes and decided menu interactions were a good time to do so. However, I turned off battery optimizations for Plexamp and Android Webview, and it still happens.

In all cases I am listening via Bluetooth headphones, although I’ve used different pairs with the same result.

I believe this also happened with Google Podcasts app, but haven’t yet reproduced. It does not happen with CustomRadioPlayer, an internet radio streaming app.

I downloaded my logs and this appears to be where it happens. I’m not a seasoned log reader, but this doesn’t indicate anything obvious or describe the source of the “pause”. In this case, the app was open, I went “home”, then accessed the apps menu.

Sep 23, 2021 16:08:46.622 [Javascript] INFO - Cloud: [RecentPlays] Syncing complete with added: 0 deleted: 0 and dirty: 0.
Sep 23, 2021 16:08:48.545 [Javascript] INFO - App: Application state changed to background.
Sep 23, 2021 16:08:49.628 [Javascript] INFO - [AudioFocusChangeListener] Received focus loss -1 (transient: false, ducking: false).
Sep 23, 2021 16:08:49.628 [0x5cf75500] DEBUG - BASS: Audio interruption started (playing).
Sep 23, 2021 16:08:49.628 [0x5cf75500] INFO - BASS: Pause.
Sep 23, 2021 16:08:49.628 [0x5cf75500] INFO - BASS: Pausing stream 143872 with fade, kill: 0
Sep 23, 2021 16:08:49.635 [Javascript] INFO - Audio: State changed from playing to paused.
1 Like

Thank you for including the log snippet, very much appreciated!

The “focus loss -1” there is AUDIOFOCUS_LOSS from Android. Android is telling us us that we lost audio focus and should pause. I’m … not sure why, and I’m not sure how we’d tell that isn’t the case.

Thank you for confirming. So this would be similar to if, for example, I opened YouTube and pressed play on a video? Android is telling Plexamp that something else wants to play sound so please stop.

I can’t fathom why Samsung’s launcher application would be doing this, but am curious if anyone else has experienced this. These are popular phones, after all.

…and any suggestions on who to even report this to?

Yeah, that’s exactly what it looks like.

Let’s see if anyone else here has seen it.

I have that phone and can’t reproduce. Can you provide the exact steps including if you’re playing an artist/album/radio/etc. Here’s what I tried.

  • open plexamp
  • navigate to my playlist
  • shuffle
  • press phone’s home button
  • slide up to see app

Music keeps playing for me. I tried other things like long pressing on icons, left and right swiping, calling up the settings page, even opening non music apps.

I was in the midst of a reply when I think I figured it out. (Is this rubber duck debugging?)

I believe I have a misbehaving app. Specifically, CustomRadioPlayer, which is a wonderful little app for playing internet radio streams. If I force quit that app, and then open it, audio pauses in Plexamp. Subsequent app opens don’t pause music, which tells me the audio focus request is on first boot only.

To explain the behavior with the app menu, I suspect Samsung is trying to do something “smart” in the background and pre-boot apps that it has hibernated to improve responsiveness, so even though I haven’t attempted to access the offending app, it’s running first boot in the background and it requests audio focus.

I will uninstall this app and test my theory, and if confirmed, report it to the developer.

I see there was already a request to add online radio to Plexamp, so consider this a vote for that :slight_smile:

1 Like

Wow, thanks for the followup, and glad you got to the bottom of it. Impressive sleuthing!

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