public class BluetoothBroadcastReceiver
extends android.content.BroadcastReceiver
| Modifier and Type | Class and Description |
|---|---|
static interface |
BluetoothBroadcastReceiver.BroadcastCallback
Interface for this view.
|
| Constructor and Description |
|---|
BluetoothBroadcastReceiver(BluetoothBroadcastReceiver.BroadcastCallback callback)
BluetoothBroadcastReceiver listens for if bluetooth is enabled.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
static BluetoothBroadcastReceiver |
register(android.content.Context c,
BluetoothBroadcastReceiver.BroadcastCallback callback)
Helper method to register this receiver and return it for future unregister.
|
static void |
safeUnregister(android.content.Context c,
android.content.BroadcastReceiver receiver)
Helper method to unregister the receiver.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtraspublic BluetoothBroadcastReceiver(BluetoothBroadcastReceiver.BroadcastCallback callback)
callback - the callback to notify when bluetooth is enabled.public void onReceive(android.content.Context context,
android.content.Intent intent)
onReceive in class android.content.BroadcastReceiverpublic static BluetoothBroadcastReceiver register(android.content.Context c, BluetoothBroadcastReceiver.BroadcastCallback callback)
c - the context.callback - the callback to notify when bluetooth is enabled.public static void safeUnregister(android.content.Context c,
android.content.BroadcastReceiver receiver)
c - the context where the receiver was registered.receiver - the receiver that was previously registered.