|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.support.v4.content.LocalBroadcastManager
public class 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 Context.sendBroadcast(android.content.Intent):
| Method Summary | |
|---|---|
static LocalBroadcastManager |
getInstance(android.content.Context context)
|
void |
registerReceiver(android.content.BroadcastReceiver receiver,
android.content.IntentFilter filter)
Register a receive for any local broadcasts that match the given IntentFilter. |
boolean |
sendBroadcast(android.content.Intent intent)
Broadcast the given intent to all interested BroadcastReceivers. |
void |
sendBroadcastSync(android.content.Intent intent)
Like sendBroadcast(Intent), but if there are any receivers for
the Intent this function will block and immediately dispatch them before
returning. |
void |
unregisterReceiver(android.content.BroadcastReceiver receiver)
Unregister a previously registered BroadcastReceiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static LocalBroadcastManager getInstance(android.content.Context context)
public void registerReceiver(android.content.BroadcastReceiver receiver,
android.content.IntentFilter filter)
receiver - The BroadcastReceiver to handle the broadcast.filter - Selects the Intent broadcasts to be received.unregisterReceiver(android.content.BroadcastReceiver)public void unregisterReceiver(android.content.BroadcastReceiver receiver)
receiver - The BroadcastReceiver to unregister.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)public boolean sendBroadcast(android.content.Intent intent)
intent - The Intent to broadcast; all receivers matching this
Intent will receive the broadcast.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)public void sendBroadcastSync(android.content.Intent intent)
sendBroadcast(Intent), but if there are any receivers for
the Intent this function will block and immediately dispatch them before
returning.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||