# StatelessTemplate

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Inherited Constants](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate#inhconstants)\|[Ctors](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate#pubctors)\|[Methods](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate#inhmethods)  

# StatelessTemplate

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/service/controls/templates/StatelessTemplate "View this page in Kotlin")\|Java

`
public

final

class
StatelessTemplate
`  
`


``

extends `[ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate)`


``


`

|---|---|------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.service.controls.templates.ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate) ||
|   | ↳ | android.service.controls.templates.StatelessTemplate |

<br />

*** ** * ** ***

A template for a[Control](https://developer.android.com/reference/android/service/controls/Control)which has no state.  
**See also:**

- [CommandAction](https://developer.android.com/reference/android/service/controls/actions/CommandAction)

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From class[android.service.controls.templates.ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate) |-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [TYPE_ERROR](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_ERROR) Type identifier of the template returned by[getErrorTemplate()](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getErrorTemplate()).        | | `int` | [TYPE_NO_TEMPLATE](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_NO_TEMPLATE) Type identifier of[ControlTemplate.getNoTemplateObject](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getNoTemplateObject()). | | `int` | [TYPE_RANGE](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_RANGE) Type identifier of[RangeTemplate](https://developer.android.com/reference/android/service/controls/templates/RangeTemplate).                                                           | | `int` | [TYPE_STATELESS](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_STATELESS) Type identifier of[StatelessTemplate](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate).                                           | | `int` | [TYPE_TEMPERATURE](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_TEMPERATURE) Type identifier of[TemperatureControlTemplate](https://developer.android.com/reference/android/service/controls/templates/TemperatureControlTemplate).                     | | `int` | [TYPE_THUMBNAIL](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_THUMBNAIL) Type identifier of[ThumbnailTemplate](https://developer.android.com/reference/android/service/controls/templates/ThumbnailTemplate).                                           | | `int` | [TYPE_TOGGLE](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_TOGGLE) Type identifier of[ToggleTemplate](https://developer.android.com/reference/android/service/controls/templates/ToggleTemplate).                                                       | | `int` | [TYPE_TOGGLE_RANGE](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_TOGGLE_RANGE) Type identifier of[ToggleRangeTemplate](https://developer.android.com/reference/android/service/controls/templates/ToggleRangeTemplate).                                 | |

|                                                                                                                                                                             ### Public constructors                                                                                                                                                                              ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[StatelessTemplate](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate#StatelessTemplate(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` templateId) ` Construct a new[StatelessTemplate](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate) |

|                                                                                       ### Public methods                                                                                        ||
|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int` | ` `[getTemplateType](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate#getTemplateType())`() ` The template type associated with this class. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.service.controls.templates.ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate)` ` |-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` static `[ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate) | ` `[getErrorTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getErrorTemplate())`() `                                                                                                                                                                          | | ` static `[ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate) | ` `[getNoTemplateObject](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getNoTemplateObject())`() ` Get a singleton[ControlTemplate](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate), which supports no direct user input. | | ` `[String](https://developer.android.com/reference/java/lang/String)                                                   | ` `[getTemplateId](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getTemplateId())`() `                                                                                                                                                                                | | ` abstract int`                                                                                                         | ` `[getTemplateType](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getTemplateType())`() ` The template type associated with this class.                                                                                                                              | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### StatelessTemplate

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public StatelessTemplate (String templateId)
```

Construct a new[StatelessTemplate](https://developer.android.com/reference/android/service/controls/templates/StatelessTemplate)

<br />

|                                         Parameters                                          ||
|--------------|-------------------------------------------------------------------------------|
| `templateId` | `String`: the identifier for this template This value cannot be`null`. <br /> |

## Public methods

### getTemplateType

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getTemplateType ()
```

The template type associated with this class.

<br />

|                                                                          Returns                                                                          ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [ControlTemplate.TYPE_STATELESS](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#TYPE_STATELESS) <br /> |