cancel Service when user clicks Notification
问题 Similar to this post I got a service that does some work in the background. When the service starts, I'm displaying a notification. Usually you can assing an intent to the notification that is triggered when the user clicks onto the notification. Mostly an activity is then started. But how can I use a notification to inform the background service that the user want's to cancel its operation? 回答1: You can have a BroadcastReceiver to stop the Service, which is triggered through the