燮preSS /块的BroadcastReceiver在另一个应用程序 [英] Suppress / Block BroadcastReceiver in another app

查看:145
本文介绍了燮preSS /块的BroadcastReceiver在另一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GO短信最近更新了一个新的功能禁用其他消息通知。该功能会导致其他应用程序收听接收到的SMS广播不火。例如我的应用程序,黑幕短信,监听接收到的SMS广播发送通知和实际提取并保存的短信。

当在GO短信这一新功能被启用,黑幕不发送通知或保存邮件最终没有响应在所有接收到的SMS广播。

GO短信必须以某种方式注销我的应用程序的广播接收器,因为接收到的SMS广播无法中止。我的意图过滤器设置为Android的:优先级=0

有什么想法?

解决方案
  

我的意图过滤器设置到Android:优先级=0

这是优先级最低。所有其他应用程序将得到他们的机会之前,首先涉及到你。引用的<一个href="http://developer.android.com/guide/topics/manifest/intent-filter-element.html#priority">documentation:

  

它控制在广播接收机执行接收广播消息的顺序。那些具有更高的优先级值那些低价值之前​​被调用。 (该命令只适用于同步信息;它忽略异步消息)

所以,他们只是叫 abortBroadcast()。他们可能有自己的优先级抬高到屋顶。

Go SMS recently updated with a new feature "Disable other message notification". The feature causes other applications listening to the incoming SMS broadcast to not fire. For example my application, Shady SMS, listens to the incoming SMS broadcast to send notifications and to actually extract and save the SMS message.

When this new feature in Go SMS is enabled, Shady does not send a notification or save the message ultimately not responding at all to the incoming SMS broadcast.

Go SMS must somehow be unregistering my application's broadcast receiver because the incoming SMS broadcast cannot be aborted. My intent filter is set to android:priority="0".

Any thoughts?

解决方案

My intent filter is set to android:priority="0".

This is the lowest possible priority. All other applications will get their chance first before it comes to you. Quoting the documentation:

It controls the order in which broadcast receivers are executed to receive broadcast messages. Those with higher priority values are called before those with lower values. (The order applies only to synchronous messages; it's ignored for asynchronous messages.)

So, they are simply calling abortBroadcast(). They probably have their priority jacked to the roof.

这篇关于燮preSS /块的BroadcastReceiver在另一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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