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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
128Gigabytes
Prole
Posts: 14
Joined: Wed Jan 04, 2017 5:53 pm

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

Post 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
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

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

Post 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.
128Gigabytes
Prole
Posts: 14
Joined: Wed Jan 04, 2017 5:53 pm

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

Post 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?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

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

Post 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.
128Gigabytes
Prole
Posts: 14
Joined: Wed Jan 04, 2017 5:53 pm

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

Post 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
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 13 guests