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.
Asked
Active
Viewed 3,561 times
1 Answers
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
-
1I 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
-