I am using a Service class to play music in the background. While I am displaying the notification bar on top, there is issue in my app. When I kill the app, the mu
Service
That tutorial shows you how to build a BACKGROUND service, which can get killed by the system. To play music you should use a FOREGROUND service.
https://developer.android.com/guide/components/services.html#Foreground