Yatse "now playing" and icon no longer shows up on new Galaxy S21

Hey guys :slight_smile:

My phone starts crashing, so I moved on to a new home. My old phone is a Samsung Galaxy S7, the new one is a Samsung Galaxy S21. I installed the phone from scratch, I didn’t restore it from a Smart Switch or Google Backup.

I exported the Yatse settings with the built-in backup feature and restored it on the new phone.

Issue description

  • “Now playing” bar not showing in status bar drop down while playing media on S21
  • Yatse icon not showing in status bar while playing media on S21

Back on the S7 I always had the Yatse icon in the status bar during playback. Once I scroll down the status bar, I had the “now playing” bar showing, on the unlocked phone as well as on the lock screen.
On the S21 I dont have any of this. Playback is only shown in the Android own Media Panel, what I dont want/need :slight_smile:

I would like to have it back, like it was on the S7, as shown in the screenshot (for normal status bar as well as lock screen). I checked the Yatse settings (debug log attached), but didn’t find anything to separately activate that “now playing” in the status bar. So I checked the Yatse settings in the Android settings (Settings → Apps → Yatse → Notifications ). But this looks all fine as well … also under notification categories, where it shows “now playing”, it is enabled and allowed :frowning:

Logs

  • Started app, then started playback, Yatse icon and “Now playing” in status bar not showing

Screenshots
https://drive.google.com/file/d/1NjirxGWJa-bZ-vkIYoW5D3CMQbYFTCzU/view?usp=share_link

Welcome to Android 13 and their decisions.

This is how it works on Android 13 for apps that target Android 13 and respect media session. It is not possible to restore the old behaviour on that OS.

Oh no… you are kidding? The hec did Google do with Android 13… :frowning:
Making it all now way more complicated.

Any suggestions for some kind of workaround or alternative? The media session bar is missing a stop button, only has pause. Can it be changed?
Hope they will make it possible again in a nearby release… :slight_smile:
Loved that feature!

Is it possible to change the actions in the media notification?
So like the Yatse setting general settings → seek in notification manipulates the notification actions, so that the actions available in the notification change from previous/next to -30sec/+30sec.
Would love to change those in minimized mode to:

  • Stop
  • Pause/Resume
  • Forward (Next)

In maximized mode where you have 5 actions available, I dont care what additional two are displayed there, but if customizable that would be a neat workaround for the eol now playing feature <3

There won’t be stop in that mode, pausing then swiping the notification should be stopped.

There should be previous / next in the default actions. I’ll need to check if the +30 setting does apply to media session but it should.

Ah nice this works :slight_smile: So, tipping pause in media session and then swipe does really stop. One gesture more than before, but thats totally fine for me as i doesnt need to unlock phone and need to go to Yatse just to stop playback. Thanks for the hint!

And yes, default is next/prev, activating that mentioned setting does change the default to +30/-30, tested it. As this setting manipulates media session, i thought it would also be possible to implement to self-choose all actions in media session as well :wink:

The problem of the media session is that Google is stupid and refused all discussion about it …
Media session is common for everything, so what is displayed on your phone is the same as in your watch or android Auto. Yet the needs are usually very different on each devices. The +30/-30 makes no sense on Android auto way too dangerous action to use frequently.

And I can’t really do different things since as said it’s the same f…g media session for all.

Anyway yes Google did a stupid choice here ignoring user needs and only taking in account what they support in their own apps.
For basic needs the idea is not that bad, but for advanced apps and configurable apps that support all possible interaction ways, this is just absurd.

Ok got it… marked my last comment as solution as it works for me like described, so I am happy :slight_smile:

Damn google, not the first time they changed useful suff between release cycles… :frowning:

A question from a non-developer, trying to understand a bit further: why isnt it possible to support Android 13 media sessions, but in parallel create that now playing notification as an extra setting to activate/deactivate in the Yatse settings? Is it simply no longer possible to code this with media actions in other notifications than media sessions or is it “denied” as it wont support the new media session guidelines for apps?

The notification is still created, but to properly integrate with the OS I set the session ID so the OS hide the notification, but the notification is still necessary for some part and things.

Duplicating notification would lead to rate limit issues + much more battery used + more code to maintain.

This won’t happen.

1 Like

Yo got one further question regarding new media notification… if I am watching something and pause playback, on the unlocked phone in the status bar the media notification stays. So when I unlock phone aftrr couple of minutes, I can just resume playback.
The media notification is also shown on the lock screen, but once I pause playback, it disappears from lock screen after 2 to 4 minutes… so I need to unlock phone to resume.
Can I change/adjust some setting in yatse or android to make the media notification stay available on lock screen until I stop (not just pause) playback? :wink:

AFAIK there’s nothing really documented about that behavior. There’s probably tons of things for rooted devices, but except keeping a foreground services that would kill battery is you just pause and forget I have no idea.

Hm… Spotify media notification stays even on pause/stop on lockscreen until I swipe it away to finally close it. Thought thats maybe also a behaviour that can somehow be influenced/adapted hehe :wink:

Edit:

  • In an “untrusted” situation like the lockscreen, the default visibility for notification contents is VISIBILITY_PRIVATE. You probably want to see the transport controls on the lockscreen, so VISIBILITY_PUBLIC is the way to go.

Guessing this is already set, otherwise it wont show on lockscreen at all, would it?

Here I only saw there are three methods for onPlay(), onPause() and onStop(). As its not further detailed in the API, I guess my media session gets lost on lockscreen when in state onPause()… maybe there is something to specify to keep the media session alive, as mentioned like a foreground service that is active even if not currently displayed. Or maybe once can specify that above mentioned VISIBILITY_PUBLIC in onPause().
Like Spotify is doing it, at least for me. The media session is open all the time, even on lockscreen, without anything playing. Just showing paused/stopped last title. And it will only disappear once swiped away. But of course i dont know how they are doing it, but it seems possible at least :slight_smile:

They are probably keeping the foreground services to avoid being killed.

Yatse is different as it does not play locally but on a remote renderer, so there can be multiple media session active that fight for priority and everything, when paused, it would means you’d had issue listening to media locally.
Not talking about the battery usage as it requires keeping connection to Kodi or remote server unlike Spotify that can just paused nearly everything.

Oh ok… thx for explanation.