Yes, you can with permission in the manifest. You can say that your application listens to the intention android.provider.Telephony.SMS_RECEIVED, which will turn on the broadcast receiver when an SMS message arrives. Then, with permission, which allows you to read SMS, you can simply check whether the received SMS matches your parameters (for example, the sender's phone number and text content).
After you have verified that sms is the correct sms, you can start the Activity or whatever you want.
Marco grassi
source share