public class BluetoothStateReceiver
extends android.content.BroadcastReceiver
| Modifier and Type | Class and Description |
|---|---|
static interface |
BluetoothStateReceiver.Callback
Callback interface for this class.
|
| Constructor and Description |
|---|
BluetoothStateReceiver(BluetoothStateReceiver.Callback callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
static BluetoothStateReceiver |
register(android.content.Context context,
BluetoothStateReceiver.Callback callback)
Register this receiver with a series of intent filters.
|
static void |
safeUnregister(android.content.Context context,
BluetoothStateReceiver receiver)
Safe method to unregister the receiver in case of errors.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtraspublic BluetoothStateReceiver(BluetoothStateReceiver.Callback callback)
public static BluetoothStateReceiver register(android.content.Context context, BluetoothStateReceiver.Callback callback)
context - the context that will register the receiver.callback - the callback to notify when there are changes.BluetoothStateReceiverpublic static void safeUnregister(android.content.Context context,
BluetoothStateReceiver receiver)
context - the context that had registered the receiverreceiver - the receiver that was registered.public void onReceive(android.content.Context context,
android.content.Intent intent)
onReceive in class android.content.BroadcastReceiver