禁用短信的android的通知 [英] disable the notification of sms in android

查看:138
本文介绍了禁用短信的android的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/1741628/can-we-delete-an-sms-in-android-before-it-reaches-the-inbox">Can我们删除Android的短信之前到达收件箱?

我工作在Android短信应用程序,我只是想禁用特定邮件的短信通知。 我曾试图共享preference来取消短信通知,但没有奏效;之后,我试图用广播接收器的onReceive方法来更新消息状态,但随后又通知appers ....可有人建议我如何禁用原生的android短信应用程序中使用的共享preference或任何其他方式的短信notificatioin

i am working on android sms app and i just want to disable the sms notification for particular messages. I had tried shared preference to uncheck the sms notification but it didn't work;after that i tried to update the message status using broadcast receiver onreceive method but then also notification appers....can someone suggest me how to disable the sms notificatioin of native android sms app using shared preference or any other way

感谢你在前进

推荐答案

您可以拦截短信在的BroadcastReceiver ,中止广播prevent任何SMS应用程序从看到它,然后手动插入短信到短信的ContentProvider

You could intercept the SMS in a BroadcastReceiver, abort the broadcast to prevent any SMS apps from seeing it, then manually insert the SMS into the SMS ContentProvider.

不过,那么这是可怕的,脆弱的,使用非公开的API,将有可能打破第三方短信应用程序。

But then that's terrible, fragile, uses non-public APIs and will possibly break third-party SMS applications.

因此​​,基本上,没有你不能正确地做到这一点。

So basically, no you can't do this properly.

这篇关于禁用短信的android的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆