public class BleScanException extends BleException
| Modifier and Type | Class and Description |
|---|---|
static interface |
BleScanException.Reason |
| Modifier and Type | Field and Description |
|---|---|
static int |
BLUETOOTH_CANNOT_START
Scan did not start correctly because of unspecified error.
|
static int |
BLUETOOTH_DISABLED
Scan did not start correctly because the Bluetooth adapter was disabled.
|
static int |
BLUETOOTH_NOT_AVAILABLE
Scan did not start correctly because the device does not support it.
|
static int |
LOCATION_PERMISSION_MISSING
Scan did not start correctly because the user did not accept access to location services.
|
static int |
LOCATION_SERVICES_DISABLED
Scan did not start because location services are disabled on the device.
|
static int |
SCAN_FAILED_ALREADY_STARTED
Fails to start scan as BLE scan with the same settings is already started by the app.
|
static int |
SCAN_FAILED_APPLICATION_REGISTRATION_FAILED
Fails to start scan as app cannot be registered.
|
static int |
SCAN_FAILED_FEATURE_UNSUPPORTED
Fails to start power optimized scan as this feature is not supported.
|
static int |
SCAN_FAILED_INTERNAL_ERROR
Fails to start scan due an internal error.
|
static int |
SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES
Fails to start scan as it is out of hardware resources.
|
static int |
UNDOCUMENTED_SCAN_THROTTLE
On API >=25 there is an undocumented scan throttling mechanism.
|
static int |
UNKNOWN_ERROR_CODE
Unknown error code.
|
| Constructor and Description |
|---|
BleScanException(int reason) |
BleScanException(int reason,
java.util.Date retryDateSuggestion) |
BleScanException(int reason,
java.lang.Throwable causeException) |
| Modifier and Type | Method and Description |
|---|---|
int |
getReason()
Returns the reason code of scan failure.
|
java.util.Date |
getRetryDateSuggestion()
Returns a
Date suggestion when a particular BleScanException.Reason should no longer be valid |
public static final int BLUETOOTH_CANNOT_START
public static final int BLUETOOTH_DISABLED
public static final int BLUETOOTH_NOT_AVAILABLE
public static final int LOCATION_PERMISSION_MISSING
public static final int LOCATION_SERVICES_DISABLED
public static final int SCAN_FAILED_ALREADY_STARTED
public static final int SCAN_FAILED_APPLICATION_REGISTRATION_FAILED
public static final int SCAN_FAILED_INTERNAL_ERROR
public static final int SCAN_FAILED_FEATURE_UNSUPPORTED
public static final int SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES
public static final int UNDOCUMENTED_SCAN_THROTTLE
Date set with a time when the scan should work again.public static final int UNKNOWN_ERROR_CODE
public BleScanException(int reason)
public BleScanException(int reason,
java.util.Date retryDateSuggestion)
public BleScanException(int reason,
java.lang.Throwable causeException)
public int getReason()
BleScanException.Reason codes.public java.util.Date getRetryDateSuggestion()
Date suggestion when a particular BleScanException.Reason should no longer be valid