Get Intent passed to stopService(intent) in Service
问题 I have a requirement to detect source of destroying service. I am using intent and extra while calling stopService(intent). But where to catch this intent in Service class to act upon. Already gone through android docs, nothing helpful found. Any help is highly appreciated. 回答1: Now, I believe Mark Murphy when he said it isn't possible. As an alternative, you can register a BroadcastReceiver in your Service for stopping the service and then send broadcast to this receiver from all over your