public enum NearbyAvailability

  1. Object
  2. Enum<NearbyAvailability>
  3. 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

AVAILABLEThe real platform feature is present and usable.
LOCAL_ONLYA simulated implementation is active.
UNAUTHORIZEDThe platform supports the feature but a required permission has not been granted.
TEMPORARILY_UNAVAILABLEThe platform supports the feature but the radio it needs is off or temporarily unavailable.
NOT_SUPPORTEDThis 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

AVAILABLE
The real platform feature is present and usable.

LOCAL_ONLY

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

UNAUTHORIZED
The platform supports the feature but a required permission has not been granted. Recoverable: call the entry point’s requestPermissions method.

TEMPORARILY_UNAVAILABLE

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

NOT_SUPPORTED
This 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)