public enum HomeAuthorizationStatus
- Object
- Enum<HomeAuthorizationStatus>
- 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_DETERMINED | The user has not been asked yet. |
AUTHORIZED | Access granted. |
RESTRICTED | Blocked by parental controls or device management. |
DENIED | The user was asked and declined. |
UNKNOWN | This 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_DETERMINEDThe user has not been asked yet. Call
SmartHome.requestAuthorization().AUTHORIZED
AUTHORIZEDAccess granted.
RESTRICTED
RESTRICTEDBlocked by parental controls or device management. Asking again will
not help.
DENIED
DENIEDThe user was asked and declined. Recoverable only through the system
settings; see
SmartHome.openHomeSettings().UNKNOWN
UNKNOWNThis 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)