Prevent display sleep and enable wake lock in all Android and iOS web browsers.


Based on:

https://github.com/richtr/NoSleep.js


Description


The neoNoSleep plugin for VisualNEO Web prevents the device’s display from going to sleep or dimming, which is essential for applications that require continuous on-screen activity, such as interactive kiosks, presentations, or data dashboards. This plugin is particularly valuable for maintaining user engagement in scenarios where screen sleep could disrupt the app's functionality.


Enabling Sleep Prevention

The neoNoSleepEnable command activates the plugin, preventing the device screen from dimming or going to sleep as long as the app is open.

    • Command: neoNoSleepEnable
    • Syntax: neoNoSleepEnable
    • Purpose: This command is executed to enable the sleep prevention mode.

Example:

neoNoSleepEnable

Once enabled, this command will keep the display awake, making it ideal for any app that requires continuous display without user interaction.

Disabling Sleep Prevention

The neoNoSleepDisable command stops the sleep prevention mode, allowing the device to follow its normal sleep schedule. This can be useful if sleep prevention is only necessary for specific tasks or sections of the app.

    • Command: neoNoSleepDisable
    • Syntax: neoNoSleepDisable

Example:

neoNoSleepDisable

This command disables the plugin, allowing the device’s sleep settings to take over as usual.

Practical Applications

The neoNoSleep plugin is useful for:

    • Kiosk Applications: Ensuring continuous display for interactive kiosks without screen timeout interruptions.
    • Presentations: Keeping the screen active during presentations or public displays.
    • Dashboard and Monitoring Tools: Maintaining a visible dashboard for monitoring purposes, such as real-time data visualization or alert systems.

By using the neoNoSleep plugin, VisualNEO Web developers can ensure their applications remain visible and accessible during extended use, supporting uninterrupted functionality for essential app displays​.

 

neoNoSleepEnable

Purpose:

Enable sleep prevention

Category:

neoNoSleep

Syntax:

neoNoSleepEnable

 

 

neoNoSleepDisable

Purpose:

Disable sleep prevention

Category:

neoNoSleep

Syntax:

neoNoSleepDisable

 

Created with the Personal Edition of HelpNDoc: Streamline your documentation process with HelpNDoc's WinHelp HLP to CHM conversion feature