# Enum NearbyAvailability

java.lang.Object
java.lang.Enum<NearbyAvailability>
com.codename1.nearby.NearbyAvailability

All Implemented Interfaces:
  `Comparable<NearbyAvailability>`

public enum NearbyAvailability extends Enum<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 Constants
  Enum Constant
  Description
  `AVAILABLE`
  The real platform feature is present and usable.
  `LOCAL_ONLY`
  A simulated implementation is active.
  `NOT_SUPPORTED`
  This port, OS version or device cannot do it at all.
  `TEMPORARILY_UNAVAILABLE`
  The platform supports the feature but the radio it needs is off or temporarily unavailable.
  `UNAUTHORIZED`
  The platform supports the feature but a required permission has not been granted.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static NearbyAvailability`
  `valueOf(String name)`
  Returns 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`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### AVAILABLE

    public static final NearbyAvailability AVAILABLE
    The real platform feature is present and usable.

  - ### LOCAL_ONLY

    public static final NearbyAvailability 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

    public static final NearbyAvailability UNAUTHORIZED
    The platform supports the feature but a required permission has not been granted. Recoverable: call the entry point's `requestPermissions` method.

  - ### TEMPORARILY_UNAVAILABLE

    public static final NearbyAvailability 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

    public static final NearbyAvailability NOT_SUPPORTED
    This port, OS version or device cannot do it at all. Hide the feature.

- ## Method Details

  - ### values

    public static NearbyAvailability[] 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

    public static NearbyAvailability valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null