不同类型的机器人广播之间的差异 [英] differences between different types of broadcasts in android

查看:102
本文介绍了不同类型的机器人广播之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点混淆对于不同类型的机器人发送广播的文档。例如,有 sendStickyBroadcast() sendBroadcast() sendOrderedBroadcast() sendStickyOrderedBroadcast()

I am a little confused with the documentation regarding the different types of sending broadcasts in Android. For example, there is sendStickyBroadcast(), sendBroadcast(), sendOrderedBroadcast() and sendStickyOrderedBroadcast().

一个棘手的,正常的,有序的广播之间的区别是什么?

What is the difference between a sticky, normal and ordered broadcast?

推荐答案

您可以将持久广播用便条比较。有人张贴了它,当你路过,你可以读/你的应用程序启动 - 无论何时它被张贴了

You can compare a sticky broadcast with a sticky note. Someone posts it and you can read when you pass by/your application starts - regardless of when it was posted.

这是有序的广播就像是传递一个音符 - 从人/应用程序的人/应用程序传递。随时随地在链中的收件人可以选择从看到它取消广播preventing链的其余部分。

An ordered broadcast is like passing a note - it passes from person/application to person/application. Anywhere in the chain the recipient can elect to cancel the broadcast preventing the rest of the chain from seeing it.

一个正常播出..好,只是发送给大家,是允许和放大器;登记听吧。

A normal broadcast.. well, just sends to everyone that's allowed & registered to listen to it.

有广播的变化,只允许接收器注册的在运行的应用程序以听取他们的意见 - 即在AndroidManifest.xml中的接收器不是触发这些意图

There's a variation of broadcasts that only allow receivers registered in a running application to listen to them - i.e. a receiver in your AndroidManifest.xml will not trigger for these Intents.

这篇关于不同类型的机器人广播之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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