Android.Service.Controls Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides device controls that an application publishes to the Android system interface.
Classes
| Name | Description |
|---|---|
| Control |
Represents a physical object that can be represented by a |
| Control.InterfaceConsts |
Provides the parcelable interface constants exposed through the control binding. |
| Control.StatefulBuilder |
Builder class for |
| Control.StatelessBuilder |
Builder class for |
| ControlsProviderService |
Service implementation allowing applications to contribute controls to the System UI. |
| DeviceTypes |
Device types for |
Enums
| Name | Description |
|---|---|
| ControlsSurface |
Specifies where Android displays device controls. |
| ControlStatus |
Specifies the result of retrieving a control's current device state. |
| DeviceType |
Specifies the device category used to select a control's default icon and color. |
Remarks
Implement ControlsProviderService to supply controls and handle user actions. Use Control.StatelessBuilder for discovery and suggestions, and Control.StatefulBuilder for current-state updates. Publishers must respect subscription demand. Send action response codes through the supplied consumer and publish visible state changes separately. Controls require device unlock by default; disabling this requirement does not override the user setting for actions on a locked device. Supply an activity pending intent for interactions beyond the control template.
See the Android implementation.