Run as background service

Hi guys.

Is there a way to run Juce as a background service in mobile devices (Android / iOS)? So if the app gets sent to the background is not killed by the OS?

UI is not important, its state can be cached / restored if needed. But would be cool to keep the Application and message loop running. I don’t see an easy way to do it on Android since the app life cycle is tied to the main activity.

On iOS I still haven’t look deeply.

Thanks!

I can’t speak for whether this is possible using the current JUCE architecture, however, this is definitely possible on Android using a foreground service, which is essentially a background service with a notification to let the user know that an app is consuming resources in the background.

More info: https://developer.android.com/guide/components/foreground-services

1 Like

Thanks don.

Yeah, got confused between background and foreground :slight_smile:

The problem with Juce is that the entire application life cycle is tied to the main activity…