I want to ask a question.
I have make a button that starts and stops a background service.
I make a class SmsReceiver which reads an incoming sms.
So i want when the service is start to call the the Sms BroadcastReceiver.
Any ideas or any other idea how to read an sms with background service?
I want to ask a question. I have make a button that starts and
Share
If you already have the
SmsReceiverworking fine,all you need to do is register it from theService.To do that you need to override theService‘sonCreate().Your Service should look something like this:
In the manifest, be sure to include the necessary SMS permissions and remember to also declare the
Servicein the manifest.