Page 1 of 1

On Love 0.11.1 for Android is there a way to keep music playing when the app is not active?

Posted: Fri Sep 06, 2019 4:43 am
by 128Gigabytes
I'm trying to make a music player app but can't find a way to keep the whole app from pausing when put into the background

Re: On Love 0.11.1 for Android is there a way to keep music playing when the app is not active?

Posted: Fri Sep 06, 2019 6:07 am
by 128Gigabytes
basically the opposite of this problem lol https://love2d.org/forums/viewtopic.php?f=11&t=81551

Re: On Love 0.11.1 for Android is there a way to keep music playing when the app is not active?

Posted: Fri Sep 06, 2019 3:29 pm
by raidho36
I've found a Unity-specific solution (editing the AppActivity.java file), it may work for you as well.
https://forum.unity.com/threads/android ... rk.443436/
That said, using LOVE for a music player is probably not a good idea. It's heavy on the battery, doesn't support a lot of formats or audioplayer-specific features, and it doesn't even allows you to freely load files and navigate filesystems.

Re: On Love 0.11.1 for Android is there a way to keep music playing when the app is not active?

Posted: Sat Sep 07, 2019 11:42 pm
by 128Gigabytes
Hey so I'm not able to find AppActivity.java in the decompiled love app, do you know where it is stored at?

I when you say it cant load files are you saying any mp3 files not inside my app can't be played?

Re: On Love 0.11.1 for Android is there a way to keep music playing when the app is not active?

Posted: Sun Sep 08, 2019 6:35 am
by raidho36
That's not the actual name; I have no idea what it's called for LOVE but there's just one of this file in there, you can't miss it.
128Gigabytes wrote:
Sat Sep 07, 2019 11:42 pm
I when you say it cant load files are you saying any mp3 files not inside my app can't be played?
Pretty much yeah. I mean technically you can access any file in the OS provided you know its exact full path in beforehand (and you have appropriate permissions), but that's obviously not gonna cut for a music player, and you can't browse directories with Lua builtin tools. With enough effort you can hijack PhysFS and get it to work system-wide rather than within your app archive & save folder. But at that point you should just make a Java Android app instead. To reiterate, your use case doesn't benefit from using a videogame-specific framework, more like it's the opposite.

Re: On Love 0.11.1 for Android is there a way to keep music playing when the app is not active?

Posted: Wed Sep 11, 2019 2:13 am
by 128Gigabytes
Oh okay, I was mainly trying to use Love since I had some experience with it and a lot of experience with lua but it sounds like I'm out of luck lol thanks for the info