Blocking outgoing SMS/MMS in android

前端 未结 2 1310
遥遥无期
遥遥无期 2021-01-03 08:12

I have Read Incoming SMS Content and Blocked the same before entering in to the inbox. The code is Given below:

import android.content.BroadcastReceiver;
imp         


        
相关标签:
2条回答
  • 2021-01-03 08:49

    Your receiver is invoked only, when action android.provider.Telephony.SMS_RECEIVED is fired. Thus it doesn't react, when SMS is sent.

    I am far from being expert, but I think, there is no possibility, to block outgoing messages. The default SMS Application uses android.telephony.SmsManager's method SendDataMessage() that doesn't send any broadcast.

    0 讨论(0)
  • 2021-01-03 08:57

    I captured the event while sending the sms , i use an observer on "content://sms/" , i make a query and i get the last sent sms then i delete it : getContentResolver().delete("content://sms/","_id=?",new String[] { message_id});

    My problem that this idea work perfectly on Emulator but not on real device.

    0 讨论(0)
提交回复
热议问题