can I send “SMS received intent”?

前端 未结 1 1433
盖世英雄少女心
盖世英雄少女心 2021-01-13 05:25

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.

相关标签:
1条回答
  • 2021-01-13 05:50

    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);
    
    0 讨论(0)
提交回复
热议问题