public enum HealthRequestStatus
- Object
- Enum<HealthRequestStatus>
- HealthRequestStatus
ImplementsComparable<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 constants
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. |
UNKNOWN | The platform could not determine the status. |
Methods
public static HealthRequestStatus[] values() | |
public static HealthRequestStatus valueOf(String name) |
Inherited methods
Enum constant details
SHOULD_REQUEST
SHOULD_REQUESTAt least one requested access has never been presented; showing the
sheet will prompt the user.
UNNECESSARY
UNNECESSARYEvery 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
UNKNOWNThe platform could not determine the status.
Method details
values
public static HealthRequestStatus[] values()valueOf
public static HealthRequestStatus valueOf(String name)