Android Audio Playback in Background alway stops after some time

Hi, I implemented a simple audio file player, following the Tutorial at https://docs.juce.com/master/tutorial_playing_sound_files.html
Current JUCE version (master branch), Android Nougat Phone.
It turned out to work fine in Android as long as I keep the app in foreground and the Screen alive. When in background and / or screen is off, the playback stops after some time (10 - 30 seconds). Any experienced android developer here to give me a hint how to build a juce based player working in background?

Also, i tried calling Process::hide() from within my app and it crashes the app instead of suspending it…

This happens because of ‘battery optimizations’. I don’t know how to achieve result you’re looking for using Juce. But from Android side I recommend you to look into Wake Locks or maybe foreground services.
https://developer.android.com/training/scheduling/wakelock.html

Thank you! I’ll check out more information about wake l for audio playing on android.