Is this completely and utterly impossible in android Kitkat since Google has made so many changes to the way messaging works? I have tried using broadcast receivers and abortBroadcast, but to no avail.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Is there any way to block SMS programmatically in Android KitKat?
No. Starting with KitKat, the SMS_RECEIVED
broadcast cannot be aborted, so any app with the RECEIVE_SMS
permission can still listen for it and retrieve the incoming message. If your app is the default app, it can choose not to write the message to the Provider, so it will not appear to any app querying the Provider for messages, but even the default app cannot abort the SMS_RECEIVED
broadcast.