I used the example given here to build a media-player service, although I did not really understand why it worked. But it works very well - so well that I cannot find a way to stop it when I want to.
I have also read this post which might or might not be relevant, and again I don't really understand it. I have tried using Service.StopForeground and StopService(Me) but that has the opposite effect; I get multiple instances like some mythological monster that grows two heads for every one you cut off.
So, having started a persistent foreground service, how do I stop it?
I have also read this post which might or might not be relevant, and again I don't really understand it. I have tried using Service.StopForeground and StopService(Me) but that has the opposite effect; I get multiple instances like some mythological monster that grows two heads for every one you cut off.
So, having started a persistent foreground service, how do I stop it?