public enum NearbyAvailability
- Object
- Enum<NearbyAvailability>
- NearbyAvailability
ImplementsComparable<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 constants
AVAILABLE | The real platform feature is present and usable. |
LOCAL_ONLY | A simulated implementation is active. |
UNAUTHORIZED | The platform supports the feature but a required permission has not been granted. |
TEMPORARILY_UNAVAILABLE | The platform supports the feature but the radio it needs is off or temporarily unavailable. |
NOT_SUPPORTED | This port, OS version or device cannot do it at all. |
Methods
public static NearbyAvailability[] values() | |
public static NearbyAvailability valueOf(String name) |
Inherited methods
Enum constant details
AVAILABLE
AVAILABLEThe real platform feature is present and usable.
LOCAL_ONLY
LOCAL_ONLYA 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
UNAUTHORIZEDThe platform supports the feature but a required permission has not
been granted. Recoverable: call the entry point’s
requestPermissions method.TEMPORARILY_UNAVAILABLE
TEMPORARILY_UNAVAILABLEThe 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
NOT_SUPPORTEDThis port, OS version or device cannot do it at all. Hide the
feature.
Method details
values
public static NearbyAvailability[] values()valueOf
public static NearbyAvailability valueOf(String name)