TABLE OF CONTENTS

2.3.1.Whenever the Switch is turned On

Code inside this block will be executed whenever the app switch is turned On/Off

Example 2.3.1

Code inside this block will be executed whenever the app switch is turned On,Where the light is turn on with red color



Before Execution


After Execution

2.3.2.Whenever the Switch is turned Off

Code inside this block will be executed whenever the app switch is turned On/Off

Example 2.3.2

Code inside this block will be executed whenever the app switch is turned Off,Where the light is turn off with red color



Before Execution


After Execution


2.3.3.Set current state of the app Switch to ON

Set current state of the app Switch

Example 2.3.3

When distance element is double tapped the switch state turns to on and red light will indicate this process.



Before Execution


After Execution



2.3.4.Set current state of the app Switch to OffSet current state of the app Switch

Example 2.3.4

When distance element is double tapped the switch state turns to on and red light will indicate this process.When the switch state turns Off green  light will be indicated.



Before Execution

After Execution 



2.3.5.Get current State of the app Switch ,means 1 as On and 0 as Off

Get current State of the app Switch ,means 1 as On and 0 as Off

Example 2.3.5

When distance element is Flipped down  the state of switch state turns to 0 and white light will indicate this process.When distance element is flipped up the switch state turns to on or 1 and white light will indicate this process


Before execution



After Execution