register receiver in a service
<p>I have a service that can be started and stopped from a button, but within the service I want to register a receiver to listen for SMS broadcasts. I only want the service to listen for SMS while it is running. I tried registerReceiver(receiver, intentfilter), but this does not work. What am I doing wrong?</p>
