中止在Android奇巧短信意向 [英] Abort SMS Intent on Android KitKat

查看:222
本文介绍了中止在Android奇巧短信意向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个需要处理的短信,只有当它是预期的应用(上注册相同的行为WhatsApp的)短信的应用程序。

I'm currently developing an application that needs to deal with SMS only if it is an SMS expected by the application (same behaviour as Whatsapp on registration).

我想中止短信意图,因为它预计不会出现在短信中。

I would like to abort the SMS Intent as it is not expected to appear in the SMS box.

我的问题是:我知道,谷歌改变了很多有关SMS的行为奇巧,而现在,即使我的短信是我的应用程序以及解析,短信也出现在SMSBox,就算我叫 this.abortBroadcast(); 在我的短信广播接收机。那么,有没有办法避免这些出现在短信中手机短信,而无需开发一个完整的SMS应用?

My question is : I know that Google changed a lot about SMS behaviour in KitKat, and now, even if my SMS is well parsed by my application, the SMS also appear in SMSBox, even if I call this.abortBroadcast(); in my SMS broadcast receiver. So is there a way to avoid those SMS appearing in SMS box without having to develop a complete SMS application ?

有关信息,重点是尚未1000(我试过还与MAX整数)的清单文件中查找该广播接收器。

For information, the priority is yet to 1000 (and I tried also with MAX Integer) in Manifest file for this Broadcast Receiver.

推荐答案

聊使用最大可能的优先级(999元的意向筛选文档),因此你不能放弃它与LT; 4.4版本。在4.4+,只有默认短信应用(<一href="http://android-developers.blogspot.com/2013/10/getting-your-sms-apps-ready-for-kitkat.html">blog后与详细信息)可以更改SMS提供(即自动删除短信)。

Hangouts uses the maximum possible priority (999 per the Intent-Filter docs) and therefore you cannot abort it on <4.4 releases. On 4.4+, only the default SMS app (blog post with details) can make changes to the SMS Provider (i.e., automatically delete the SMS).

这篇关于中止在Android奇巧短信意向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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