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
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.
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.