Reputation: 85
I use background service in my audio player project. I create my service as "REDELIVER_INTENT" so if the service stop it starts again and continues to play music. But after i destroy it with "stopForeground(true);" service is stopping but it starts working again after a while. Is there any way to stop "REDELIVER_INTENT" background service and prevent starting again itself.
Upvotes: 0
Views: 38
Reputation: 1007533
Call stopService()
(on a Context
) or stopSelf()
(on the Service
itself) to stop the service. stopForeground()
only removes the foreground aspect of the service; it does not stop the service.
Upvotes: 1