VishnuSanal / DialogMusicPlayer

A simple and minimal music player dialog :)
https://vishnusanal.github.io/posts/story-of-dialogmusicplayer/
GNU General Public License v3.0
82 stars 5 forks source link

Close DMP after file finishes playing #55

Open Cwpute opened 11 months ago

Cwpute commented 11 months ago

Is your feature request related to a problem? Please describe. A current bug makes DMP repeat playing the last played file after certain actions in other apps. This could be avoided if DMP wasn't running at all after it ended playing the lart file.

Also most of the time i don't find myself needing to play again files i previously listened to. Since my workflow implies switching apps and opening the top menu for the smartphone pretty often, i have to make with the passive dmp notification player taking a good bunch of space, and the app appearing in the Recent/Active Apps button (◻️ or ≡). Closing the notification and app would do, but it would gelp having the app do it for me

Describe the solution you'd like DMP should close altogether after the previous file finished playing. This could be an option.

Describe alternatives you've considered It could close after a determinate amount of time (1 minute, 20 seconds, 10 seconds maybe) to allow the user to play it again.

Additional context As DMP opens very fast, i don't see much drawbacks to this. It probably will conflict with some people's workflow, hence the ability to make it an option. This is mainly to circumvent the mentionned bug, but it would still be interesting as a feature.

Cwpute commented 11 months ago

sorry, i thought the app had been updated but it hasn't been. i am dumb ! and sorry. See you in 2.1.2 :)

VishnuSanal commented 11 months ago

@Cwpute No worries, appreciate the effort! :)

Cwpute commented 9 months ago

I am now using 2.1.2 and that issue is still there :/

VishnuSanal commented 9 months ago

good suggestion, makes sense. let's remove DMP from recents 10 seconds after the track finishes playing.

marking this as a good first issue, since this is easy to implement :)

dev notes! stop MediaPlaybackService from MediaPlayer#OnCompletionListener by calling TransportControls#onStop after ten seconds.