This topic describes how your application can enable and disable the screensaver functionality on the device.
AppCommon API
The screensaver is used to prevent screen burn when the device screen displays a still image or the user provides no input for some time. If the screensaver is enabled, it is automatically shown after a defined amount of time with no activity.
You must disable the screensaver during activities when the user is watching the screen without giving input, such as video playback or image slideshows. You can use the AppCommon API to enable and disable the screensaver.
Note If "Auto Protection Time" is switched off in the device settings, enabling and disabling the screensaver using the AppCommon API has no effect. Before published, your application must enable and disable the screensaver appropriately.
If "Auto Protection Time" is switched off in the device settings, enabling and disabling the screensaver using the AppCommon API has no effect.
Before published, your application must enable and disable the screensaver appropriately.
webapis.appcommon.setScreenSaver( webapis.appcommon.AppCommonScreenSaverState.SCREEN_SAVER_ON, function(result) { console.log(result); }, function(error) { console.log(JSON.stringify(error)); } );
webapis.appcommon.setScreenSaver( webapis.appcommon.AppCommonScreenSaverState.SCREEN_SAVER_OFF, function(result) { console.log(result); }, function(error) { console.log(JSON.stringify(error)); } );