The media control randomly appears, even if I don't open the app

Issue description:

At first, I realised this might be an auto-bluetooth option. But I have since turned off ‘headphone auto-play’ and ‘bluetooth auto-play’ and while no music starts playing, I find it strange that the media control in my notification tray randomly appears.

This can be frustrating if I’m listening to something else, and then the Symfonium media control appears as the ‘primary’ control. It’s not stopping my other media or anything, but it appears as the first in the ‘list’ of media controls (I’m using a Pixel 8 Pro).

The only pattern I can find, is that it always happens when I restart my phone. If I restart my phone, when it boots up and I log in (I have device encryption on) I can see Symphonium open itself (with some notification in the tray) and shortly after the media control is there, even though I don’t want it there because I haven’t opened the app yet.

Logs:

Upload description: skype-thread-kite

Additional information:

 
I think it may also be occurring when I connect to Android Auto, but I have not seen any setting like ‘start on connect to Android Auto’ so I’m not sure why this is happening.
 

Reproduction steps:

 

  1. Have ‘headphone auto-play’ turned off.
  2. Have ‘bluetooth auto-play’ turned off.
  3. Restart your phone.
  4. Observe that upon rebooting, the app starts itself and puts a media control in the notifications, even if you don’t open the app (or even if the app was closed before restarting too)
     

Media provider:

Jellyfin

Screenshots:

 

    

I should add that I myself am a developer, so if you need more information or if I’m doing something wrong please let me know! I know how hard it can be to debug these issues sometimes! I’m still on the free trial, but I’m really considering buying since it looks like an awesome app. If I can fix this weird control behaviour then I will definitely purchase :slight_smile: as I want to move away from Spotify and to Jellyfin :slight_smile:

Apps can’t start themselves it’s the OS that does that.

The app support media session resuming and all the shiny Android stuff.
So on reboot the OS start the app to ask for the last queue so you can resume playback.

In the logs

2025-02-09 07:37:47.394 Verbose PlayerService  onStartCommand Intent { cmp=app.symfonik.music.player/app.symfonik.core.playback.service.PlayerService }
2025-02-09 07:37:47.394 Verbose PlayerService  onGetRoot: com.google.android.bluetooth / null

There’s also restart of the app because the OS bluetooth connects to exposed media browser.

Most of those are normal on Android for modern apps, you can long press the media session then the cog and unselect pin media player and show assistant media recommendations.

The fact that an unactive restore media session is pushed in front over another app currently playing is an Android bug they’ll maybe fix one day.

Thanks for this insight into how the OS interacts with the app! I’ll have a dig around to see if there’s anything in the phone settings that might be causing this.

It’s strange that it only happens for Symfonium however. I wonder why other apps I use with media controls aren’t also being started/resumed by the OS in the same way :thinking:

Because most apps use outdated things and do not support all the things Android offers.

Typically Media controls  |  Android media  |  Android Developers that give the same solution as I did to prevent that on OS side.