How to unregister Listener & stop service from within broadcastreceiver
问题 In my App I have a broadcast receiver that upon receiving a keyword in an SMS message, it starts a service that tracks the GPS location of the phone. I do this using - context.startService(new Intent(context,TrackGPS.class)); I also need to be able to stop the service upon receiving another keyword in an SMS message, I have tried to do this but the GPS sensor still tracks the location and GPS icon flashes at the top of the screen. I tried to do this using - context.stopService(new Intent