# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Ctors | Methods | Inherited Methods

# TemperatureControlTemplate

`public final class TemperatureControlTemplate`
`` `extends ControlTemplate` ``

java.lang.Object
↳ | android.service.controls.templates.ControlTemplate
| ↳ | android.service.controls.templates.TemperatureControlTemplate

A template for a temperature related `Control` that supports multiple modes. Both the current mode and the active mode for the control can be specified. The combination of the `Control#getDeviceType` and the current and active mode will determine colors and transitions for the UI element.

## Summary

### Constants
`int` | `FLAG_MODE_COOL` Flag to indicate that the device supports cool mode.
`int` | `FLAG_MODE_ECO` Flag to indicate that the device supports eco mode.
`int` | `FLAG_MODE_HEAT` Flag to indicate that the device supports heat mode.
`int` | `FLAG_MODE_HEAT_COOL` Flag to indicate that the device supports heat-cool mode.
`int` | `FLAG_MODE_OFF` Flag to indicate that the device supports off mode.
`int` | `MODE_COOL` Indicates that the current or active mode of the device is set to cool.
`int` | `MODE_ECO` Indicates that the current or active mode of the device is set to eco.
`int` | `MODE_HEAT` Indicates that the current or active mode of the device is set to heat.
`int` | `MODE_HEAT_COOL` Indicates that the current or active mode of the device is set to heat-cool.
`int` | `MODE_OFF` Indicates that the current or active mode of the device is off.
`int` | `MODE_UNKNOWN` Use when the current or active mode of the device is not known Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

### Inherited constants
From class `android.service.controls.templates.ControlTemplate`
`int` | `TYPE_ERROR` Type identifier of the template returned by `getErrorTemplate()`.
`int` | `TYPE_NO_TEMPLATE` Type identifier of `ControlTemplate#getNoTemplateObject`.
`int` | `TYPE_RANGE` Type identifier of `RangeTemplate`.
`int` | `TYPE_STATELESS` Type identifier of `StatelessTemplate`.
`int` | `TYPE_TEMPERATURE` Type identifier of `TemperatureControlTemplate`.
`int` | `TYPE_TOGGLE` Type identifier of `ToggleTemplate`.
`int` | `TYPE_TOGGLE_RANGE` Type identifier of `ToggleRangeTemplate`.

### Public constructors
`TemperatureControlTemplate(String templateId, ControlTemplate controlTemplate, int currentMode, int currentActiveMode, int modesFlag)` Construct a new `TemperatureControlTemplate`.

### Public methods
`int` | `getCurrentActiveMode()`
`int` | `getCurrentMode()`
`int` | `getModes()`
`ControlTemplate` | `getTemplate()`
`int` | `getTemplateType()` The `TemplateType` associated with this class.

### Inherited methods
From class `android.service.controls.templates.ControlTemplate`
`static ControlTemplate` | `getErrorTemplate()`
`static ControlTemplate` | `getNoTemplateObject()` Get a singleton `ControlTemplate`, which supports no direct user input.
`String` | `getTemplateId()`
`abstract int` | `getTemplateType()` The `TemplateType` associated with this class.
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.

## Constants

### FLAG_MODE_COOL

    public static final int FLAG_MODE_COOL

Flag to indicate that the device supports cool mode.

Constant Value: 8 (0x00000008)

### FLAG_MODE_ECO

    public static final int FLAG_MODE_ECO

Flag to indicate that the device supports eco mode.

Constant Value: 32 (0x00000020)

### FLAG_MODE_HEAT

    public static final int FLAG_MODE_HEAT

Flag to indicate that the device supports heat mode.

Constant Value: 4 (0x00000004)

### FLAG_MODE_HEAT_COOL

    public static final int FLAG_MODE_HEAT_COOL

Flag to indicate that the device supports heat-cool mode.

Constant Value: 16 (0x00000010)

### FLAG_MODE_OFF

    public static final int FLAG_MODE_OFF

Flag to indicate that the device supports off mode.

Constant Value: 2 (0x00000002)

### MODE_COOL

    public static final int MODE_COOL

Indicates that the current or active mode of the device is set to cool.
Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

Constant Value: 3 (0x00000003)

### MODE_ECO

    public static final int MODE_ECO

Indicates that the current or active mode of the device is set to eco.
Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

Constant Value: 5 (0x00000005)

### MODE_HEAT

    public static final int MODE_HEAT

Indicates that the current or active mode of the device is set to heat.
Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

Constant Value: 2 (0x00000002)

### MODE_HEAT_COOL

    public static final int MODE_HEAT_COOL

Indicates that the current or active mode of the device is set to heat-cool.
Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

Constant Value: 4 (0x00000004)

### MODE_OFF

    public static final int MODE_OFF

Indicates that the current or active mode of the device is off.
Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

Constant Value: 1 (0x00000001)

### MODE_UNKNOWN

    public static final int MODE_UNKNOWN

Use when the current or active mode of the device is not known
Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`

Constant Value: 0 (0x00000000)

## Public constructors

### TemperatureControlTemplate

    public TemperatureControlTemplate (String templateId,
                    ControlTemplate controlTemplate,
                    int currentMode,
                    int currentActiveMode,
                    int modesFlag)

Construct a new `TemperatureControlTemplate`. The current and active mode have to be among the ones supported by the flags.

Parameters
`templateId` | `String`: the identifier for this template object This value cannot be `null`.
`controlTemplate` | `ControlTemplate`: a template to use for interaction with the user This value cannot be `null`.
`currentMode` | `int`: the current mode for the `Control` Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`
`currentActiveMode` | `int`: the current active mode for the `Control` Value is `MODE_UNKNOWN`, `MODE_OFF`, `MODE_HEAT`, `MODE_COOL`, `MODE_HEAT_COOL`, or `MODE_ECO`
`modesFlag` | `int`: a flag representing the available modes for the `Control` Value is either `0` or a combination of `FLAG_MODE_OFF`, `FLAG_MODE_HEAT`, `FLAG_MODE_COOL`, `FLAG_MODE_HEAT_COOL`, and `FLAG_MODE_ECO`

Throws
`IllegalArgumentException` | if the parameters passed do not make a valid template.

## Public methods

### getCurrentActiveMode

    public int getCurrentActiveMode ()

Returns
`int` |

### getCurrentMode

    public int getCurrentMode ()

Returns
`int` |

### getModes

    public int getModes ()

Returns
`int` |

### getTemplate

    public ControlTemplate getTemplate ()

Returns
`ControlTemplate` | This value cannot be `null`.

### getTemplateType

    public int getTemplateType ()

The `TemplateType` associated with this class.

Returns
`int` | `ControlTemplate#TYPE_TEMPERATURE`

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