# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# Control.StatelessBuilder

`public static final class Control.StatelessBuilder`
`extends Object` ``

java.lang.Object
↳ | android.service.controls.Control.StatelessBuilder

Builder class for `Control`. This class facilitates the creation of `Control` with no state. Must be used to provide controls for `ControlsProviderService#createPublisherForAllAvailable` and `ControlsProviderService#createPublisherForSuggested`. It provides the following defaults for non-optional parameters:

- Device type: `DeviceTypes#TYPE_UNKNOWN`
- Title: `""`
- Subtitle: `""`

This fixes the values relating to state of the `Control` as required by `ControlsProviderService#createPublisherForAllAvailable`:

- Status: `Status#STATUS_UNKNOWN`
- Control template: `ControlTemplate#getNoTemplateObject`
- Status text: `""`

## Summary

### Public constructors
`StatelessBuilder(String controlId, PendingIntent appIntent)`
`StatelessBuilder(Control control)` Creates a `StatelessBuilder` using an existing `Control` as a base.

### Public methods
`Control` | `build()`
`Control.StatelessBuilder` | `setAppIntent(PendingIntent appIntent)`
`Control.StatelessBuilder` | `setControlId(String controlId)`
`Control.StatelessBuilder` | `setCustomColor(ColorStateList customColor)` Optional color to be shown with the `Control`.
`Control.StatelessBuilder` | `setCustomIcon(Icon customIcon)` Optional icon to be shown with the `Control`.
`Control.StatelessBuilder` | `setDeviceType(int deviceType)`
`Control.StatelessBuilder` | `setStructure(CharSequence structure)` Optional top-level group to help define the `Control`'s location, visible to the user.
`Control.StatelessBuilder` | `setSubtitle(CharSequence subtitle)`
`Control.StatelessBuilder` | `setTitle(CharSequence title)`
`Control.StatelessBuilder` | `setZone(CharSequence zone)` Optional group name to help define the `Control`'s location within a structure, visible to the user.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### StatelessBuilder

    public StatelessBuilder (String controlId,
                    PendingIntent appIntent)

Parameters
`controlId` | `String`: the identifier for the `Control` This value cannot be `null`.
`appIntent` | `PendingIntent`: the pending intent linking to the device Activity This value cannot be `null`.

### StatelessBuilder

    public StatelessBuilder (Control control)

Creates a `StatelessBuilder` using an existing `Control` as a base.

Parameters
`control` | `Control`: base for the builder. This value cannot be `null`.

## Public methods

### build

    public Control build ()

Returns
`Control` | a valid `Control` This value cannot be `null`.

### setAppIntent

    public Control.StatelessBuilder setAppIntent (PendingIntent appIntent)

Parameters
`appIntent` | `PendingIntent`: a `PendingIntent` linking to an Activity for the `Control` This value cannot be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setControlId

    public Control.StatelessBuilder setControlId (String controlId)

Parameters
`controlId` | `String`: the identifier for the `Control` This value cannot be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setCustomColor

    public Control.StatelessBuilder setCustomColor (ColorStateList customColor)

Optional color to be shown with the `Control`. It is highly recommended to let the system default the color unless the default is not suitable for the application.

Parameters
`customColor` | `ColorStateList`: background color to use This value may be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setCustomIcon

    public Control.StatelessBuilder setCustomIcon (Icon customIcon)

Optional icon to be shown with the `Control`. It is highly recommended to let the system default the icon unless the default icon is not suitable.

Parameters
`customIcon` | `Icon`: icon to show This value may be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setDeviceType

    public Control.StatelessBuilder setDeviceType (int deviceType)

Parameters
`deviceType` | `int`: type of device represented by this `Control`, used to determine the default icon and color Value is `DeviceTypes.TYPE_GENERIC_ON_OFF`, `DeviceTypes.TYPE_GENERIC_START_STOP`, `DeviceTypes.TYPE_GENERIC_OPEN_CLOSE`, `DeviceTypes.TYPE_GENERIC_LOCK_UNLOCK`, `DeviceTypes.TYPE_GENERIC_ARM_DISARM`, `DeviceTypes.TYPE_GENERIC_TEMP_SETTING`, `DeviceTypes.TYPE_GENERIC_VIEWSTREAM`, `DeviceTypes.TYPE_UNKNOWN`, `DeviceTypes.TYPE_AC_HEATER`, `DeviceTypes.TYPE_AC_UNIT`, `DeviceTypes.TYPE_AIR_FRESHENER`, `DeviceTypes.TYPE_AIR_PURIFIER`, `DeviceTypes.TYPE_COFFEE_MAKER`, `DeviceTypes.TYPE_DEHUMIDIFIER`, `DeviceTypes.TYPE_DISPLAY`, `DeviceTypes.TYPE_FAN`, `DeviceTypes.TYPE_HOOD`, `DeviceTypes.TYPE_HUMIDIFIER`, `DeviceTypes.TYPE_KETTLE`, `DeviceTypes.TYPE_LIGHT`, `DeviceTypes.TYPE_MICROWAVE`, `DeviceTypes.TYPE_OUTLET`, `DeviceTypes.TYPE_RADIATOR`, `DeviceTypes.TYPE_REMOTE_CONTROL`, `DeviceTypes.TYPE_SET_TOP`, `DeviceTypes.TYPE_STANDMIXER`, `DeviceTypes.TYPE_STYLER`, `DeviceTypes.TYPE_SWITCH`, `DeviceTypes.TYPE_TV`, `DeviceTypes.TYPE_WATER_HEATER`, `DeviceTypes.TYPE_DISHWASHER`, `DeviceTypes.TYPE_DRYER`, `DeviceTypes.TYPE_MOP`, `DeviceTypes.TYPE_MOWER`, `DeviceTypes.TYPE_MULTICOOKER`, `DeviceTypes.TYPE_SHOWER`, `DeviceTypes.TYPE_SPRINKLER`, `DeviceTypes.TYPE_WASHER`, `DeviceTypes.TYPE_VACUUM`, `DeviceTypes.TYPE_AWNING`, `DeviceTypes.TYPE_BLINDS`, `DeviceTypes.TYPE_CLOSET`, `DeviceTypes.TYPE_CURTAIN`, `DeviceTypes.TYPE_DOOR`, `DeviceTypes.TYPE_DRAWER`, `DeviceTypes.TYPE_GARAGE`, `DeviceTypes.TYPE_GATE`, `DeviceTypes.TYPE_PERGOLA`, `DeviceTypes.TYPE_SHUTTER`, `DeviceTypes.TYPE_WINDOW`, `DeviceTypes.TYPE_VALVE`, `DeviceTypes.TYPE_LOCK`, `DeviceTypes.TYPE_SECURITY_SYSTEM`, `DeviceTypes.TYPE_HEATER`, `DeviceTypes.TYPE_REFRIGERATOR`, `DeviceTypes.TYPE_THERMOSTAT`, `DeviceTypes.TYPE_CAMERA`, `DeviceTypes.TYPE_DOORBELL`, or `DeviceTypes.TYPE_ROUTINE`

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setStructure

    public Control.StatelessBuilder setStructure (CharSequence structure)

Optional top-level group to help define the `Control`'s location, visible to the user. If not present, the application name will be used as the top-level group. A structure contains zones which contains controls.

Parameters
`structure` | `CharSequence`: name of the structure containing the control This value may be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setSubtitle

    public Control.StatelessBuilder setSubtitle (CharSequence subtitle)

Parameters
`subtitle` | `CharSequence`: additional information about the `Control`, to appear underneath the title This value cannot be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setTitle

    public Control.StatelessBuilder setTitle (CharSequence title)

Parameters
`title` | `CharSequence`: the user facing name of the `Control` This value cannot be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

### setZone

    public Control.StatelessBuilder setZone (CharSequence zone)

Optional group name to help define the `Control`'s location within a structure, visible to the user. A structure contains zones which contains controls.

Parameters
`zone` | `CharSequence`: name of the zone containing the control This value may be `null`.

Returns
`Control.StatelessBuilder` | `this` This value cannot be `null`.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*