Enum NearbyError
- All Implemented Interfaces:
Comparable<NearbyError>
Typed error codes carried by every
NearbyException thrown through the
failure path of the com.codename1.nearby APIs. Callers branch on these
via NearbyException.getError() rather than string-matching a message.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA conflicting operation is already in progress -- for example a second association flow while the system chooser is open.The supplied token, accessory configuration, endpoint identifier or device filter could not be decoded or used, or came from a different platform.Transport-level I/O failure while moving a payload.The requested feature is not available on this port, this OS version or this hardware.The peer, accessory or endpoint could not be reached, or moved out of range before the operation completed.The radio this feature needs is switched off or otherwise unavailable right now -- UWB disabled in settings, Bluetooth powered off, Wi-Fi off.A ranging or transport session could not be started -- an invalid configuration, too many concurrent sessions, or a platform-level refusal.A running session was invalidated by the platform and cannot be resumed.The platform never delivered a completion callback within the safety timeout, or a discovery/connection attempt timed out.A required runtime permission or OS authorization is missing.Unclassified failure; the exception message carries the details.The user dismissed a system dialog (the device chooser, the association prompt, a permission request) or the operation was cancelled throughAsyncResource.cancel(). -
Method Summary
Modifier and TypeMethodDescriptionstatic NearbyErrorReturns the enum constant of this type with the specified name.static NearbyError[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
NOT_SUPPORTED
The requested feature is not available on this port, this OS version or this hardware. The capability queries --isSupported()on each entry point, plus the finer-grainedRangingCapabilities-- let cross-platform code branch before ever seeing this code, and the inert fallback bridges fail every operation with it. -
UNAUTHORIZED
A required runtime permission or OS authorization is missing. On Android that isUWB_RANGING, the Bluetooth runtime grants or location; on iOS it is the Nearby Interaction or local network authorization the user declined. See therequestPermissionsmethod on the relevant entry point. -
RADIO_UNAVAILABLE
The radio this feature needs is switched off or otherwise unavailable right now -- UWB disabled in settings, Bluetooth powered off, Wi-Fi off. UnlikeNOT_SUPPORTEDthis is recoverable: the same call may succeed once the user turns the radio on. -
PEER_UNAVAILABLE
The peer, accessory or endpoint could not be reached, or moved out of range before the operation completed. -
SESSION_FAILED
A ranging or transport session could not be started -- an invalid configuration, too many concurrent sessions, or a platform-level refusal. -
SESSION_INVALIDATED
A running session was invalidated by the platform and cannot be resumed. Start a new one. -
INVALID_TOKEN
The supplied token, accessory configuration, endpoint identifier or device filter could not be decoded or used, or came from a different platform. Tokens are opaque and are not portable between iOS and Android.
A device filter reports this rather than being dropped: an association request whose filter cannot be installed would otherwise offer the user every visible device instead of the ones asked for, and they could associate the wrong accessory from a picker that was never meant to show it.
-
TIMEOUT
The platform never delivered a completion callback within the safety timeout, or a discovery/connection attempt timed out. -
BUSY
A conflicting operation is already in progress -- for example a second association flow while the system chooser is open. -
USER_CANCELED
The user dismissed a system dialog (the device chooser, the association prompt, a permission request) or the operation was cancelled throughAsyncResource.cancel(). -
IO_ERROR
Transport-level I/O failure while moving a payload. Blocking stream payloads throw plainjava.io.IOExceptioninstead. -
UNKNOWN
Unclassified failure; the exception message carries the details.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-