Enum HealthAvailability
- All Implemented Interfaces:
Comparable<HealthAvailability>
Whether a platform health store is usable right now, and if not, why.
Check this before anything else -- on Android the provider app may be
missing or out of date, which is recoverable by the user.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA platform health store is present and usable.No platform store, but this port keeps health data locally (the simulator, and the desktop and JavaScript ports).This platform has no health support at all.Android only: the Health Connect provider app is not installed.Android only: the Health Connect provider is installed but too old. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthAvailabilityReturns the enum constant of this type with the specified name.static HealthAvailability[]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
A platform health store is present and usable. -
LOCAL_ONLY
No platform store, but this port keeps health data locally (the simulator, and the desktop and JavaScript ports). Reads and writes work and are durable, but the data is this app's own -- nothing is shared with other apps, and no device or third-party app writes into it.
Apps that only aggregate their own measurements can treat this as working. Apps whose whole purpose is reading what other apps recorded should tell the user the feature needs a phone.
-
PROVIDER_UPDATE_REQUIRED
Android only: the Health Connect provider is installed but too old. Send the user toHealth.openProviderSetup(). -
PROVIDER_NOT_INSTALLED
Android only: the Health Connect provider app is not installed. Send the user toHealth.openProviderSetup(). -
NOT_SUPPORTED
This platform has no health support at all.
-
-
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
-