Enum NearbyPermission
- All Implemented Interfaces:
Comparable<NearbyPermission>
The runtime permissions the com.codename1.nearby APIs may need, named
by what the app is trying to do rather than by any one platform's
permission string.
Each entry point takes these as varargs in its requestPermissions
method and maps them to whatever the running platform actually asks for:
on Android a set of manifest permissions, on iOS an authorization prompt
raised by the first call that needs it. A port that needs no permission
for a given constant reports it granted rather than failing.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic NearbyPermissionReturns the enum constant of this type with the specified name.static NearbyPermission[]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
-
RANGING
Precision ranging. AndroidUWB_RANGING; on iOS the Nearby Interaction authorization prompted by the first session. -
DISCOVERY
Discovering nearby devices to advertise to or range against. AndroidBLUETOOTH_SCANplusNEARBY_WIFI_DEVICES(or location below API 33); on iOS the local network authorization. -
ADVERTISE
Advertising this device so others can find it. AndroidBLUETOOTH_ADVERTISE; no iOS equivalent. -
CONNECT
Connecting to a discovered device and moving payloads. AndroidBLUETOOTH_CONNECT; no iOS equivalent.
-
-
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
-