I have created a music player which plays music through service, but after some time when i am outside the app music stops at random time, and i am getting the Log massage "Audio focus client died",i am not able to figure this out..why this is happening
I am not attaching any code source because this is really a simple code that is not doing any complex task Just one service that playing music and one Audio focus helper which monitor the focus of audio..
It may be because the Android OS would have killed the service due to lack of resources. You can make your service foreground to avoid it. Here is the snippit:
Just call it in onCreate of service.