Other APIs
You can call ControlsProviderService.requestAddControl()
to ask the system to ask the user if a particular control should be added to the POWER screen. For example, you might do this in response to some user input or configuration of a device for which you offer controls.
In addition to the elements that we configured on controls in the sample, you can supply:
- A subtitle to appear below the title
- A “structure” and a “zone”, to help the user identify the specific device managed by the tile (e.g., which light switch?)
- A custom color or icon to use in the tile
Also, stateful controls can have “status text”, which is shown adjacent to the icon and gives you another way to textually represent the current status of whatever the tile manages.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.