Does anyone know a reliable way to block incoming/outgoing SMS messages through code? It's ok if the actual SMS messages are being received, but I would like to block any notifications of that SMS being received. Also, the user shouldn't be allowed to send (or prefferably even type) an SMS message. Is that possible?
Thanks
Regarding blocking of incoming sms. You can register broadcast receiver with high priority so your code gets called before system app is called. Than in broadcast receiver, you can abort the broadcast and other apps won't see it.
register receiver in manifest:
and then in broadcast receiver:
You can't block outgoing text messages.
Here's what I use for blocking incoming texts.
SmsReceiver.java
AndroidManifest.xml
The main thing to take away from the manifest is the service block, receiver block, and the permissions.