Is there any way to block SMS programmatically in Android KitKat?

寵の児 提交于 2019-12-23 04:43:52

问题


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.



来源:https://stackoverflow.com/questions/25587668/is-there-any-way-to-block-sms-programmatically-in-android-kitkat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!