Added in API level 30

FloatAction


class FloatAction : ControlAction
kotlin.Any
   ↳ android.service.controls.actions.ControlAction
   ↳ android.service.controls.actions.FloatAction

Action sent by a RangeTemplate, ToggleRangeTemplate.

Summary

Inherited constants
Public constructors
FloatAction(templateId: String, newValue: Float)

FloatAction(templateId: String, newValue: Float, challengeValue: String?)

Public methods
Int

Float

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

Inherited functions

Public constructors

FloatAction

Added in API level 30
FloatAction(
    templateId: String,
    newValue: Float)
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
FloatAction(
    templateId: String,
    newValue: Float,
    challengeValue: String?)
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
fun getActionType(): Int
Return
Int ControlAction.TYPE_FLOAT

getNewValue

Added in API level 30
fun getNewValue(): Float

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