We are using a script on an MDM lockdown designed to run a local script on the SD card of a Samsung TAB A6.
The script we are using is as follows...
(function() {
const idleDurationSecs = 90;
const redirectUrl = '<MCLink10>';
let idleTimeout;
const resetIdleTimeout = function() {
if(idleTimeout) clearTimeout(idleTimeout);
idleTimeout = setTimeout(() => location.href = redirectUrl, idleDurationSecs * 1000);
};
resetIdleTimeout();
['click', 'touchstart', 'mousemove'].forEach(evt =>
document.addEventListener(evt, resetIdleTimeout, false)
);
})();
This function of the script seems to work (it runs the local script on inactivity) However, the "reset idle timeout does not seem to be working as intended. When the device is touched it seems to pause the time out rather than reet the time out. The script also does not seem to run when the Tab is locked however, we do have workarounds to this.
Any advice would be greatly appreciated as my knowledge of coding and especially Javascript is very limited.
kind regards, Harry.