现在的位置: 首页 > 综合 > 正文

sendBroadcast翻译

2019年05月20日 ⁄ 综合 ⁄ 共 804字 ⁄ 字号 评论关闭

发送广播

void android.content.ContextWrapper.sendBroadcast(Intent intent)

 

public void sendBroadcast (Intent intent)

Since: API Level 1

Broadcast the given intent to all interested BroadcastReceivers. This call is asynchronous; it returns immediately, and you will continue executing while the receivers are run. No results are propagated from receivers and receivers can not abort the broadcast.
If you want to allow receivers to propagate results or abort the broadcast, you must send an ordered broadcast using sendOrderedBroadcast(Intent, String).

广播给定的intent给所有感兴趣的BroadcastReceivers,这个调用是异步的;它会立即返回,当接受者运行时,你会继续进行执行。接受者不会返回结果,并且接受者不能忽略这个消息。如果你想接受者返回结果或者取消这个broadcast,你必须使用sendOrderedBroadcast(Intent, String)发送一个排序的broadcast。

 

See BroadcastReceiver for more information on Intent broadcasts.

 

Parameters

intent  The Intent to broadcast; all receivers matching this Intent will receive the broadcast.

抱歉!评论已关闭.