有没有办法拦截Android SMS发送以转发到不同的传输?
例如,我可以监听来自应用程序层的一些广播(例如,消息传递)并在电话层将消息发送出设备之前使用该消息吗?
For example, can I listen for some broadcast from the app layer (e.g., messaging) and consume the message prior to the telephony layer sends it out of the device?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以接收意图并在收到消息后处理消息,但是您无法阻止和发送文本消息。许多人希望能够检测已发送的消息,但这本身可能很困难。唯一可以做到的方法是读取 SMS ContentProvider,但这并不是很多人推荐的方法。
You can receive an intent and process a message on receipt of a message, however there is nothing you can do to stop and outgoing text message. Many people want to be able to detect for sent messages, and that in itself can be difficult. The only way that that can be done is by reading the SMS ContentProvider, which isn't something that comes recommended by many.
不会。传出消息没有广播意图,只有传入消息。
No. There are no broadcast intents for outgoing messages, only incoming.