Enum NearbyAvailability
- All Implemented Interfaces:
Comparable<NearbyAvailability>
How much of a com.codename1.nearby feature is really usable right now.
This is deliberately finer than a boolean, because the three interesting cases behave differently: an app on a desktop simulator should show its full UI against simulated peers, an app on an iPhone SE should hide the ranging feature outright, and an app whose user switched the radio off should ask them to switch it back on rather than hide anything.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe real platform feature is present and usable.A simulated implementation is active.This port, OS version or device cannot do it at all.The platform supports the feature but the radio it needs is off or temporarily unavailable.The platform supports the feature but a required permission has not been granted. -
Method Summary
Modifier and TypeMethodDescriptionstatic NearbyAvailabilityReturns the enum constant of this type with the specified name.static NearbyAvailability[]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
-
AVAILABLE
The real platform feature is present and usable. -
LOCAL_ONLY
A simulated implementation is active. Everything works, but nothing outside this process can see it -- this is what the desktop ports, the simulator and the JavaScript port report so that ranging and association UI is developable without hardware. Never returned by a device port. -
UNAUTHORIZED
The platform supports the feature but a required permission has not been granted. Recoverable: call the entry point'srequestPermissionsmethod. -
TEMPORARILY_UNAVAILABLE
The platform supports the feature but the radio it needs is off or temporarily unavailable. Recoverable without any action from the app beyond asking the user to enable it. -
NOT_SUPPORTED
This port, OS version or device cannot do it at all. Hide the feature.
-
-
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
-