public final class AtakBroadcast
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AtakBroadcast.DocumentedIntentFilter
Instead of using IntentFilters, ATAK makes use of
DocumentedIntentFilter to provide for automatic extraction of
documentation supplied by the developer.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
static AtakBroadcast |
getInstance() |
java.util.List<AtakBroadcast.DocumentedIntentFilter> |
getLocalDocumentedFilters()
Method still in progress
|
java.util.List<AtakBroadcast.DocumentedIntentFilter> |
getSystemDocumentedFilters()
Method still in progress
|
static void |
init(android.content.Context context) |
void |
registerReceiver(android.content.BroadcastReceiver receiver,
AtakBroadcast.DocumentedIntentFilter filter)
Register a receive for any ATAK broadcasts that match the given DocumentedIntentFilter.
|
void |
registerSystemReceiver(android.content.BroadcastReceiver receiver,
AtakBroadcast.DocumentedIntentFilter filter)
Register a system wide receiver.
|
boolean |
sendBroadcast(android.content.Intent intent)
Broadcast the given intent to all interested BroadcastReceivers.
|
void |
sendIntents(java.util.List<android.content.Intent> intents)
Method for iterating over an intent list and sending out the intents.
|
boolean |
sendSystemBroadcast(android.content.Intent intent)
Broadcast the given intent to all interested BroadcastReceivers (to include those outside of the
system).
|
boolean |
sendSystemBroadcast(android.content.Intent intent,
java.lang.String permission)
Broadcast the given intent to all interested BroadcastReceivers (to include those outside of the
system).
|
void |
unregisterReceiver(android.content.BroadcastReceiver receiver)
Unregister a previously registered BroadcastReceiver.
|
void |
unregisterSystemReceiver(android.content.BroadcastReceiver receiver)
Unregister a previously registered BroadcastReceiver.
|
public static final java.lang.String TAG
public static void init(android.content.Context context)
public static AtakBroadcast getInstance()
public void dispose()
public void registerReceiver(android.content.BroadcastReceiver receiver, AtakBroadcast.DocumentedIntentFilter filter)
receiver
- The BroadcastReceiver to handle the broadcast.filter
- Selects the Intent broadcasts to be received.unregisterReceiver(android.content.BroadcastReceiver)
public void registerSystemReceiver(android.content.BroadcastReceiver receiver, AtakBroadcast.DocumentedIntentFilter 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, com.atakmap.android.ipc.AtakBroadcast.DocumentedIntentFilter)
public void unregisterSystemReceiver(android.content.BroadcastReceiver receiver)
receiver
- The BroadcastReceiver to unregister.registerSystemReceiver(android.content.BroadcastReceiver, com.atakmap.android.ipc.AtakBroadcast.DocumentedIntentFilter)
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, com.atakmap.android.ipc.AtakBroadcast.DocumentedIntentFilter)
public boolean sendSystemBroadcast(android.content.Intent intent)
intent
- The Intent to broadcast; all receivers matching this
Intent will receive the broadcast.registerSystemReceiver(android.content.BroadcastReceiver, com.atakmap.android.ipc.AtakBroadcast.DocumentedIntentFilter)
public boolean sendSystemBroadcast(android.content.Intent intent, java.lang.String permission)
intent
- The Intent to broadcast; all receivers matching this
Intent will receive the broadcast.permission
- the permission to be used when sending a system broadcastregisterSystemReceiver(android.content.BroadcastReceiver, com.atakmap.android.ipc.AtakBroadcast.DocumentedIntentFilter)
public void sendIntents(java.util.List<android.content.Intent> intents)
intents
- list of intents to sendpublic java.util.List<AtakBroadcast.DocumentedIntentFilter> getLocalDocumentedFilters()
public java.util.List<AtakBroadcast.DocumentedIntentFilter> getSystemDocumentedFilters()