Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ISetSwitchable

interface ISetSwitchable
Extends com.amazon.apmf.IStandard This interface allows describing a switchable component. It provides methods for providing the current state of the component (on or off) and providing text labels which describe the on and off states. Examples of these text labels might be the typical “on” and “off”, but might also be something like “enabled” and “disabled”.

Methods

on()

void on(bool on)
Set the on state of this switchable component.

Parameters

on
bool — Required true if this component is currently on.

textOn()

void textOn(string text)
Set the text that describes the “on” state of this component.

Parameters

text
string — Required the text describing the “on” state.

textOff()

void textOff(string text)
Set the text that describes the “off” state of this component.

Parameters

text
string — Required the text describing the “off” state.

toggleFunction()

void toggleFunction(ICallbackFunction* toggleFunction)
Set a function to call when clients request to toggle this switchable component.

Parameters

toggleFunction
ICallbackFunction* — Required the function to call.
Last modified on October 29, 2026