I've created an app, based on this link https://www.geeksforgeeks.org/services-in-android-with-example/, for playing an audio file than have 10 hours in background. But, after block or minimize, unfortunately, the sound stops after some time.
Do someone have an idea why this happening? Is there a way that keeps the app playing the sound after block or minimize, just like Spotify does?
CodePudding user response:
I have made a repo for that app. For now, I have not added features to add controls when the app is running but will be coming soon. But, for now, when the app goes in background, the audio starts playing with the following controls:
- Start
- Pause
- Reset
You can find the repo over here.