Enum HealthRequestStatus
- All Implemented Interfaces:
Comparable<HealthRequestStatus>
Whether presenting the authorization sheet would actually show the user
anything. Maps HKHealthStore.getRequestStatusForAuthorization on iOS
and a permission-set comparison on Android.
This is the only read-related signal iOS offers, and it is one-way:
UNNECESSARY means "the user has already been asked", never "the user
said yes". Use it to decide whether to show a pre-permission explainer
screen, not to decide whether reads will return data.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAt least one requested access has never been presented; showing the sheet will prompt the user.The platform could not determine the status.Every requested access has already been presented. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthRequestStatusReturns the enum constant of this type with the specified name.static HealthRequestStatus[]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
-
SHOULD_REQUEST
At least one requested access has never been presented; showing the sheet will prompt the user. -
UNNECESSARY
Every requested access has already been presented. The user may have granted or denied any of them; this value does not say which, and showing the sheet again would display nothing. -
UNKNOWN
The platform could not determine the status.
-
-
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
-