finamp icon indicating copy to clipboard operation
finamp copied to clipboard

Media notification persists after stopping playback

Open BaccanoMob opened this issue 1 year ago • 5 comments

Steps to reproduce:

  1. Enable the stop button in Layout & Theme > Customization > enable here.
  2. Play a song/playlist/album
  3. Close the app
  4. Stop queue with media notification
  5. Press play in media notification

Excepted behavior after stop button is pressed is to either

  • remove the media notification when the stop button is pressed or
  • attempt to resume last queue or restart last queue from the beginning when play button is pressed.

BaccanoMob avatar Sep 25 '24 06:09 BaccanoMob

The stop button clears the queue, which also means that after an app restart it will not be restored automatically. That the notification is still visible is just a bug, I'll try to look into it.

Chaphasilor avatar Sep 25 '24 07:09 Chaphasilor

Is this settings or platform-specific? I don't see a stop button either in-app or in the notification on Android.

corngood avatar Apr 07 '25 12:04 corngood

@corngood

Enable the stop button in Layout & Theme > Customization > enable here.

It's one of the toggles under customization menu.

BaccanoMob avatar Apr 10 '25 01:04 BaccanoMob

Enable the stop button in Layout & Theme > Customization > enable here.

I'm sorry, assuming that didn't get added later on, I clearly didn't read it very well.

I can't reproduce this on my local build, which makes me think it might be fixed by #1148.

When I hit stop on the notification, the notification gets removed immediately.

Close the app

Do you mean simply minimising it? That's what I'm testing. I haven't tried killing it yet (force stop removes the notification immediately, and I'm having adb trouble, so I can't test adb am kill right now).

corngood avatar Apr 10 '25 19:04 corngood

so I can't test adb am kill right now

I tested this. After the app is killed, the notification no longer has a stop button (or seek bar, etc), so you can only hit play, wait for the app to restart, and then hit stop.

corngood avatar Apr 10 '25 20:04 corngood

@flloschy @f-4dev is this your issue too?

Chaphasilor avatar Aug 05 '25 11:08 Chaphasilor

sounds like it whats your OS @corngood?

flloschy avatar Aug 05 '25 11:08 flloschy

GrapheneOS latest (at the time) on a pixel 8a.

corngood avatar Aug 05 '25 13:08 corngood

Haha @F-4Dev and I are also using graphene

Im abit disconnected from this problem, does it work on normal android @Chaphasilor? I forgot

flloschy avatar Aug 05 '25 13:08 flloschy

Happens for me too. (Pixel 6 with GOS). But found another small inconsistency while testing this
https://github.com/jmshrv/finamp/issues/1321

F-4Dev avatar Aug 05 '25 16:08 F-4Dev

The same issue btw also happen upon holding the notification and clicking "hide" which doesn't really only hide the notification but also closes the app. But upon swiping down again the notification is still there without the queue. This is similar to this issue I made

F-4Dev avatar Aug 05 '25 16:08 F-4Dev

No, doesn't work for me either 🙃

First stop actually seems to "pause" (stop and like button still shown), second stop leads to the state without progress bar or buttons, just the play button. Finamp is still active in the background (disabled battery optimizations).

Restoring via play also doesn't work in that state (I'm guessing there's a play event we're not handling correctly, where we could restore the moat recent queue).

So I guess we somehow need to manually remove the notification on stop?
Should be possible somewhere in audio_service...

Chaphasilor avatar Aug 05 '25 16:08 Chaphasilor