FloatAction


public final class FloatAction
extends ControlAction

java.lang.Object
   ↳ android.service.controls.actions.ControlAction
     ↳ android.service.controls.actions.FloatAction


Action sent by a RangeTemplate, ToggleRangeTemplate.

Summary

Inherited constants

Public constructors

FloatAction(String templateId, float newValue)
FloatAction(String templateId, float newValue, String challengeValue)

Public methods

int getActionType()

The action type associated with this class.

float getNewValue()

The new value set for the range in the corresponding RangeTemplate.

Inherited methods

Public constructors

FloatAction

Added in API level 30
public FloatAction (String templateId, 
                float newValue)

Parameters
templateId String: the identifier of the RangeTemplate that produced this action. This value cannot be null.

newValue float: new value for the state displayed by the RangeTemplate.

FloatAction

Added in API level 30
public FloatAction (String templateId, 
                float newValue, 
                String challengeValue)

Parameters
templateId String: the identifier of the RangeTemplate that originated this action. This value cannot be null.

newValue float: new value for the state of the RangeTemplate.

challengeValue String: a value sent by the user along with the action to authenticate. null is sent when no authentication is needed or has not been requested.

Public methods

getActionType

Added in API level 30
public int getActionType ()

The action type associated with this class.

Returns
int ControlAction#TYPE_FLOAT

getNewValue

Added in API level 30
public float getNewValue ()

The new value set for the range in the corresponding RangeTemplate.

Returns
float