public enum HealthAvailability
- Object
- Enum<HealthAvailability>
- HealthAvailability
ImplementsComparable<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 constants
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). |
PROVIDER_UPDATE_REQUIRED | Android only: the Health Connect provider is installed but too old. |
PROVIDER_NOT_INSTALLED | Android only: the Health Connect provider app is not installed. |
NOT_SUPPORTED | This platform has no health support at all. |
Methods
public static HealthAvailability[] values() | |
public static HealthAvailability valueOf(String name) |
Inherited methods
Enum constant details
AVAILABLE
AVAILABLEA platform health store is present and usable.
LOCAL_ONLY
LOCAL_ONLYNo 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
PROVIDER_UPDATE_REQUIREDAndroid only: the Health Connect provider is installed but too old.
Send the user to
Health.openProviderSetup().PROVIDER_NOT_INSTALLED
PROVIDER_NOT_INSTALLEDAndroid only: the Health Connect provider app is not installed.
Send the user to
Health.openProviderSetup().NOT_SUPPORTED
NOT_SUPPORTEDThis platform has no health support at all.
Method details
values
public static HealthAvailability[] values()valueOf
public static HealthAvailability valueOf(String name)