public enum HomeAuthorizationStatus

  1. Object
  2. Enum<HomeAuthorizationStatus>
  3. HomeAuthorizationStatus

ImplementsComparable<HomeAuthorizationStatus>

Whether the user has granted this app access to their home.

Unlike the health API, this question has an honest answer on every backend: HomeKit publishes HMHomeManagerAuthorizationStatus and the Google Home APIs publish the account and structure grant. There is no read/write split – a home is authorized as a whole, and what an app may do to a particular accessory is a property of the accessory, not of the grant.

Enum constants

NOT_DETERMINEDThe user has not been asked yet.
AUTHORIZEDAccess granted.
RESTRICTEDBlocked by parental controls or device management.
DENIEDThe user was asked and declined.
UNKNOWNThis port cannot answer the question because it has no backend to ask.

Methods

public static HomeAuthorizationStatus[] values()
public static HomeAuthorizationStatus valueOf(String name)

Inherited methods

Enum constant details

NOT_DETERMINED

NOT_DETERMINED
The user has not been asked yet. Call SmartHome.requestAuthorization().

AUTHORIZED

AUTHORIZED
Access granted.

RESTRICTED

RESTRICTED
Blocked by parental controls or device management. Asking again will not help.

DENIED

DENIED
The user was asked and declined. Recoverable only through the system settings; see SmartHome.openHomeSettings().

UNKNOWN

UNKNOWN
This port cannot answer the question because it has no backend to ask. Returned by the inert fallback and by the local simulated home.

Method details

values

public static HomeAuthorizationStatus[] values()

valueOf

public static HomeAuthorizationStatus valueOf(String name)