Difference between revisions of "Application:setKeepAwake"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Controls the screen dimming and device sleeping of the device. When the application has no touc...")
 
Line 13: Line 13:
 
<br />
 
<br />
 
<source lang="lua">
 
<source lang="lua">
= Application:setKeepAwake(keepAwake,)
+
Application:setKeepAwake(keepAwake)
 
</source>
 
</source>
'''keepAwake:''' (boolean) if true, screen is kept awake. ''''''<br/>
+
'''keepAwake''': (boolean) if true, screen is kept awake. ''''''<br/>

Revision as of 11:21, 23 August 2018

Available since: Gideros 2011.6

Description


Controls the screen dimming and device sleeping of the device. When the application has no touches as user input for some period,
the system puts the device into a sleep state where the screen dims. However some applications have no input and controlled
by accelerometer or gyroscope only. For these kind applications, the screen should be kept awake by calling this function
with parameter `true`.

<ul>
<li>*Note:** This function has no effect on desktop.</li>
</ul>

 Application:setKeepAwake(keepAwake)

'keepAwake: (boolean) if true, screen is kept awake. '