java.lang.Object | |
↳ | android.support.v4.content.LocalBroadcastManager |
Helper to register for and send broadcasts of Intents to local objects
within your process. This is has a number of advantages over sending
global broadcasts with sendBroadcast(Intent)
:
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Register a receive for any local broadcasts that match the given IntentFilter.
| |||||||||||
Broadcast the given intent to all interested BroadcastReceivers.
| |||||||||||
Like
sendBroadcast(Intent) , but if there are any receivers for
the Intent this function will block and immediately dispatch them before
returning. | |||||||||||
Unregister a previously registered BroadcastReceiver.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Register a receive for any local broadcasts that match the given IntentFilter.
receiver | The BroadcastReceiver to handle the broadcast. |
---|---|
filter | Selects the Intent broadcasts to be received. |
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.
intent | The Intent to broadcast; all receivers matching this Intent will receive the broadcast. |
---|
Like sendBroadcast(Intent)
, but if there are any receivers for
the Intent this function will block and immediately dispatch them before
returning.
Unregister a previously registered BroadcastReceiver. All filters that have been registered for this BroadcastReceiver will be removed.
receiver | The BroadcastReceiver to unregister. |
---|