Android Question Audio Service Background

nicieri

Active Member
Licensed User
Longtime User
My application has an audio service, and the issue is that when an audio file is playing and the app is closed, the audio keeps playing in the background. However, when the app is reopened, the same audio file can be played again, leading to the audio being played multiple times simultaneously. How can I ensure that the service stops when a new audio file starts playing? I hope I’m explaining this clearly. I haven’t been able to solve it because once the app is closed, I no longer have access to the resources related to the previous playback.
 
Top