5

Title is obvious. Can I send "SMS received intent" on the android phone? In other words, virtually receive custom SMS to fake some SMS receivers.

Melug
  • 1,023
  • 9
  • 14

1 Answers1

3

You can create fake SMS (GMS type) so built-in catch like real message. Here is my answer

 Intent intent = new Intent();
intent.setClassName("com.android.mms",
        "com.android.mms.transaction.SmsReceiverService");
intent.setAction("android.provider.Telephony.SMS_RECEIVED");
intent.putExtra("pdus", new Object[] { pdu });
intent.putExtra("format", "3gpp");
context.startService(intent);
Community
  • 1
  • 1
Trung Nguyen
  • 7,442
  • 2
  • 45
  • 87
  • 1
    I get this error: Caused by: java.lang.SecurityException: Not allowed to start service Intent { act=android.provider.Telephony.SMS_RECEIVED cmp=com.android.mms/.transaction.SmsReceiverService (has extras) } without permission not exported from uid 10045 – Darush Oct 02 '17 at 16:37
  • I have this permission in manifest: – Darush Oct 02 '17 at 16:37