中止/消广播 [英] Aborting/Cancelling Broadcasts

查看:129
本文介绍了中止/消广播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想:我想成为第一个收到短信广播,我想取消播出,如果短信是我唯一感兴趣的,这样的广播没有达成任何其他应用程序/接收器(默认消息应用程序等等。)。 我所知道的是:

What I want: I want to be the first to receive the Sms Broadcast and I want to cancel the broadcast if SMS is of my interest only, so that The broadcast doesn't reach any other app/receiver (Default messaging app etc.). What I know is:

  • SmsDisptacher.java使用orderedBroadcasts,可以是可以取消/放弃。

我不知道的是:

  • 如果orderedBrodcasts可以取消对其他应用程序/接收器,即除了你自己以外。

我曾尝试成为第一个接收广播:

what I have tried for being the first to receive the Broadcast:

  • 意图过滤器的Andr​​oid版本:优先=1000

我曾尝试取消已播出:

  • AbortBroadcast();
  • broadcastReceiver.setResult code(RESULT_CANCELED)
  • clearAbortBroadcast()

推荐答案

得到了答案的http://groups.google.com/group/android-developers/browse_thread/thread/78fecbc156f4a1ea它是不可能的。

Got my answer http://groups.google.com/group/android-developers/browse_thread/thread/78fecbc156f4a1ea Its not possible.

这篇关于中止/消广播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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