Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

iOSApp.SetIdleTimerDisabled

Sets whether the idle timer is disabled for the app.

Component Version macOS Windows Linux Server iOS SDK
iOSApp 10.1 ❌ No ❌ No ❌ No ❌ No ✅ Yes
MBS( "iOSApp.SetIdleTimerDisabled"; Value )   More

Parameters

Parameter Description Example
Value The new value.
Pass 1 to disable idle sleep or pass 0 to enable.
1

Result

Returns OK or error.

Description

Sets whether the idle timer is disabled for the app.
The default value of this property is 0. When most apps have no touches as user input for a short period, the system puts the device into a "sleep” state where the screen dims. This is done for the purposes of conserving power. However, apps that don't have user input except for the accelerometer—games, for instance—can, by setting this property to 1, disable the “idle timer” to avert system sleep.

See also ProcessActivity.beginActivity function.

Examples

Disable the idle timer:

Set Variable [ $r; Value: MBS( "iOSApp.SetIdleTimerDisabled"; 1 ) ]

Enable the idle timer:

Set Variable [ $r; Value: MBS( "iOSApp.SetIdleTimerDisabled"; 0 ) ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 17th January 2020, last changed 19th June 2023


iOSApp.SetDidReceiveMemoryWarningScript - iOSApp.SetOrientationDidChangeEvaluate