SDKeepScreen

Description of Control

This control allows you to active and deactivate the  sleep function on the device screen.

Compatibility

Android, iOS

Using the control 

Open Extensibility Catalog, and go to the SD through the left side menu. 
Select the SDKeepScreen. Follow the step of the Wizard. 
Add an SDPanel, and add a variable of type SDKeepScreen

 

Add two buttons, one to enable control (to make the screen active), and another to disable control..

 

For the button in charge of enabling the control, we will add the following code.

Event 'KeepScreen' 
        &SDKeepScreen.KeepScreen("YES")
Endevent

And for the button that disables the control the following:  

Event 'NoKeepScreen' 
    Composite
        &SDKeepScreen.KeepScreen("NO")
        return
    Endcomposite
Endevent

Execution 

Note that when you enable control by the event that you assigned to the button, the screen does not take the rest setting, but remains on. If you want to suppress that behavior, disable it, the screen will take the sleeping arrangement. 

For this case we use as an example the buttons to call the event to enable and disable the control, but you can use it in other events that you want.