- Home /
Audio Player in Background
Hi,
I'm writing an Audio Player for Android in Unity and it works fine so far. The Problem is, if the Player runs in Background or the device goes to sleep, the audio turns of as well.
So I managed to make it run in background, but that is not a perfect solution, since it's sucking out the battery (it's Unity man!) and on the other hand, when in background, the app could be killed at any time, when the user opens another app.
But I know that there are services, that run permanently in background and wont get killed by android on low memory. So what are my options? Is there a standard android audio player, that runs in background, that i can pass the mp3 to? or do i need to write my own service? Or can I remote control another Player like VLC or so?
Any hints on that?
Your answer
![](https://koobas.hobune.stream/wayback/20220612182802im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to use external audio file in Android application? ,How to read external audio files on Android? 0 Answers
Unity background sound and player controll ? 0 Answers
Can't get path to StreamingAssets in Android 1 Answer
AudioMixer works in editor but doesn't work in Android Device 2 Answers
video-audio not playing in build (i tried webgl and android) 0 Answers