ModeAction


public final class ModeAction
extends ControlAction

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


Action sent by the user to indicate a change of mode. This action is available when the Control was created with a TemperatureControlTemplate.

Summary

Inherited constants

Public constructors

ModeAction(String templateId, int newMode)
ModeAction(String templateId, int newMode, String challengeValue)

Public methods

int getActionType()

The action type associated with this class.

int getNewMode()

Inherited methods

Public constructors

ModeAction

Added in API level 30
public ModeAction (String templateId, 
                int newMode)

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

newMode int: new value for the mode.

ModeAction

Added in API level 30
public ModeAction (String templateId, 
                int newMode, 
                String challengeValue)

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

newMode int: new value for the mode.

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_MODE.

getNewMode

Added in API level 30
public int getNewMode ()

Returns
int