Simple-Music-Player icon indicating copy to clipboard operation
Simple-Music-Player copied to clipboard

add feature to play music in the background

Open CodeCubeNeo opened this issue 3 years ago • 1 comments

Hello!

It would be really awesome to add an option in the settings to play the music in the background (to not require the android "audio focus") Meaning that i can watch a video (without sound or at low volume) and listen to music in the background. If i try to do that now it will just pause the video and when i click to continue watching the video it pauses the music (obviously). As far as i read you have to make your audio playing function a service that doesn't require audio focus (something like this https://stackoverflow.com/a/43286485). Any response will be well appreciated since this is the one thing it is missing (maybe even i can help??)

PS: I really appreciate what you are doing with open source software for providing simple privacy friendly apps!

CodeCubeNeo avatar Dec 28 '21 20:12 CodeCubeNeo

Hello. I found an open source music player app that does this and it is also written in kotlin, so you can just copy the logic from there i suppose. The github link: https://github.com/enricocid/Music-Player-GO. It has a "require audio focus" checkbox in the settings, and if it is disabled, it can play the music along some video/other audio just like it should. Hope it helps because i would really love this feature!

CodeCubeNeo avatar Jan 15 '22 18:01 CodeCubeNeo

Hey, can i work on this issue ??

Yashraj254 avatar Jul 01 '23 11:07 Yashraj254

Yes please.

CodeCubeNeo avatar Jul 01 '23 14:07 CodeCubeNeo

looks like this is no longer possible to implement on Android 12+, so closing it

tibbi avatar Jul 14 '23 09:07 tibbi

What about older androids. If it is possible to support it please let the man add it.

CodeCubeNeo avatar Jul 14 '23 15:07 CodeCubeNeo

I dont like adding features that will be used by always less people

tibbi avatar Jul 14 '23 15:07 tibbi

Metro music has background playback, aplayer has it, music player go has it... Please your music player is one that finds all of my media files, the other ones have problems playing these files. Nobody wants to do anything. This is the last thing your player needs to be perfect

CodeCubeNeo avatar Jul 14 '23 16:07 CodeCubeNeo