Intercept, read and cancel SMS message

前端 未结 3 652
小鲜肉
小鲜肉 2021-02-04 19:15

I am looking for a way to hook SMSManager or a lower level mechanism such that I can intercept, read and cancel any outgoing SMS messages before they are sent.

3条回答
  •  轮回少年
    2021-02-04 19:46

    Obviously this isn't what you want to hear, but Android is simply not designed to permit 3rd party applications to interfere with each other or over-ride the user's free choice.

    It does not provide a "hook" type of mechanism for hard interception of basic functionality, short of modifying the build of Android itself installed on the device.

    The device administrator interfaces do not include anything for regulating sms.

    Yes, occasionally people make products utilizing various "hack" methods to accomplish such things to some extent, but they are contrary to the design of the platform and thus either unreliable or likely to break when various "bug fix" type improvements are made to android. Or they come with limitation in scope, for example replacing the home screen and thus limiting what is easily launched - but only so long as that home screen app remains selected, and not being able to regulate other sources of intents.

    You may find an idea attractive enough that you decide to run with it, but bear in mind that unless it's a future introduction to the API intended for doing this kind of thing you would most likely be leveraging an oversight in the design of the platform which it's quite likely will soon be corrected.

提交回复
热议问题