public class BluetoothCrashResolver extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
BluetoothCrashResolver.UpdateNotifier |
| Constructor and Description |
|---|
BluetoothCrashResolver(Context context)
Constructor should be called only once per long-running process that does Bluetooth LE
scanning.
|
| Modifier and Type | Method and Description |
|---|---|
void |
crashDetected() |
void |
disableDebug()
Deprecated.
Since the default logger used by the android-beacon-library only logs warnings and
above, this method is no logger used. To log debug messages use the
Loggers.verboseLogger() |
void |
enableDebug()
Deprecated.
Since the default logger used by the android-beacon-library only logs warnings and
above, this method is no logger used. To log debug messages use the
Loggers.verboseLogger() |
void |
forceFlush()
Used to force a recovery operation
|
int |
getDetectedCrashCount() |
long |
getLastBluetoothCrashDetectionTime() |
int |
getRecoveryAttemptCount() |
boolean |
isLastRecoverySucceeded() |
boolean |
isRecoveryInProgress() |
void |
notifyScannedDevice(BluetoothDevice device,
BluetoothAdapter.LeScanCallback scanner)
Call this method from your BluetoothAdapter.LeScanCallback method.
|
void |
setUpdateNotifier(BluetoothCrashResolver.UpdateNotifier updateNotifier) |
void |
start()
Starts looking for crashes of the Bluetooth LE system and taking proactive steps to stop
crashes from happening.
|
void |
stop()
Stops looking for crashes.
|
public BluetoothCrashResolver(Context context)
context - the Activity or Service that is doing the Bluetooth scanningpublic void start()
public void stop()
@Deprecated public void enableDebug()
Loggers.verboseLogger()LogManager,
Loggers@Deprecated public void disableDebug()
Loggers.verboseLogger()LogManager,
Loggerspublic void notifyScannedDevice(BluetoothDevice device, BluetoothAdapter.LeScanCallback scanner)
device - public void crashDetected()
public long getLastBluetoothCrashDetectionTime()
public int getDetectedCrashCount()
public int getRecoveryAttemptCount()
public boolean isLastRecoverySucceeded()
public boolean isRecoveryInProgress()
public void setUpdateNotifier(BluetoothCrashResolver.UpdateNotifier updateNotifier)
public void forceFlush()