public enum HealthRequestStatus

  1. Object
  2. Enum<HealthRequestStatus>
  3. 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_REQUESTAt least one requested access has never been presented; showing the sheet will prompt the user.
UNNECESSARYEvery requested access has already been presented.
UNKNOWNThe 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_REQUEST
At least one requested access has never been presented; showing the sheet will prompt the user.

UNNECESSARY

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

UNKNOWN
The platform could not determine the status.

Method details

values

public static HealthRequestStatus[] values()

valueOf

public static HealthRequestStatus valueOf(String name)