-1

I have a MapView.java wherein it requests for SMS permission, Location permission etc. I created a new Java class for the SMSReceiver, which extends BroadcastReceiver and has an onReceive method.

The problem is, I am struggling with how I will call the SMSReceiver class to my MapView.Java. Can anyone help me?

lolo mo
  • 61
  • 1
  • 9

1 Answers1

0

Try this out.

Hope it will help!

registerReceiver(mySMSBroadcastReceiver, new IntentFilter(SmsRetriever.SMS_RETRIEVED_ACTION));