idle-timer

How to prevent phone from going to idle mode

≡放荡痞女 提交于 2021-01-29 07:37:29
问题 I've developed an application that streams music (via internet connection) using service and having trubles streaming content without phone going idle. While i was developing my application each time i tried case mentioned below the music was reproducing fine. Use case : search song, select song from results, play song, screen off -> auto play next song from result list I'm developing using real device - Huawei Mate 20 Lite - OS v8.01 so while debugging it gotta use USB cabel. Like i said

iPhone: Detecting user inactivity/idle time since last screen touch

江枫思渺然 提交于 2019-12-27 09:06:38
问题 Has anybody implemented a feature where if the user has not touched the screen for a certain time period, you take a certain action? I'm trying to figure out the best way to do that. There's this somewhat-related method in UIApplication: [UIApplication sharedApplication].idleTimerDisabled; It'd be nice if you instead had something like this: NSTimeInterval timeElapsed = [UIApplication sharedApplication].idleTimeElapsed; Then I could set up a timer and periodically check this value, and take

iPhone: Detecting user inactivity/idle time since last screen touch

和自甴很熟 提交于 2019-12-27 09:02:24
问题 Has anybody implemented a feature where if the user has not touched the screen for a certain time period, you take a certain action? I'm trying to figure out the best way to do that. There's this somewhat-related method in UIApplication: [UIApplication sharedApplication].idleTimerDisabled; It'd be nice if you instead had something like this: NSTimeInterval timeElapsed = [UIApplication sharedApplication].idleTimeElapsed; Then I could set up a timer and periodically check this value, and take

Help with why my app crashed?

情到浓时终转凉″ 提交于 2019-12-23 17:37:58
问题 I'm writing an iPad app that is a "kiosk" app. The iPad should be hanging on the wall and the app should just run. I did a test, starting the app last night (Friday, December 31) and letting it run. This morning, when I woke up, it was not running. I just checked the iPad's console and I can't figure out why it crashed. The iPad was plugged in and so the battery is not the issued. I did disable the idleTimer in my application delegate. The app was seen running as late as midnight last night.

Mouseenter and Mouseleave to trigger timer on/off

此生再无相见时 提交于 2019-12-23 04:04:37
问题 How would I code a mouseenter event to trigger timer off and a mouseleave event to trigger the timer on ? If the timer interval is reached then webpage will refresh. I've tried to do it but couldn't work it out: <script> $(document).ready(function() { var timer; function start() { timer = setInterval(function(){refresh()}, 5000); } start(); $('body').mouseenter(function() { clearTimeout(timer); }); }).mouseleave(function(e) { var pageX = e.pageX || e.clientX, pageY = e.pageY || e.clientY; if

Using Golang to get Windows idle time (GetLastInputInfo or similar)

a 夏天 提交于 2019-12-18 11:57:20
问题 Is there an example or method of getting a Windows system's idle time using Go? I've been looking at the documentation at the Golang site but I think I'm missing how to access (and use) the API to get system information including the idle time. 回答1: Go's website is hardcoded to show the documentation for the standard library packages on Linux. You will need to get godoc and run it yourself: go get golang.org/x/tools/cmd/godoc godoc --http=:6060 then open http://127.0.0.1:6060/ in your web

localStorage on javascript leads refreshing

痞子三分冷 提交于 2019-12-13 16:00:09
问题 I am trying to fire out the user when idle, using javascript across tabs, the below code working fine for single tab for multiple tab it is not working properly For Eg: I have set 10 secs as idle time and left the first tab it throws out the user on 10 seconds, assume i opened the first tab at 00:00:05 hours and opened second tab at 00:00:10 hours and working on second tab for 00:00:13 hours and left both the tabs the project have to logout on 00:00:23 right? but it logs out on 00:00:15 , I

auto logout idle timeout using jquery php

旧巷老猫 提交于 2019-12-08 12:56:12
问题 I searched and find some examples to set idle timeout using jquery. 1 - Idle Timeout By Eric Hynds DEMO 2 - Idle Timer By paulirish 3 - Fire Event When User is Idle / DEMO HERE 4 - detect user is active or idle on web page 5 - Comet Long Polling with PHP and jQuery 6 - detacting idle timeout javascript ... And several other similar examples Between these examples number 1 is better for i need because i need to auto logout user with any confirm alert after X minutes (logout.php or any url).

How to check idle time using jQuery and PHP?

岁酱吖の 提交于 2019-12-08 06:35:36
问题 I have a script that uses PHP SESSION . I manage PHP sessions using a class. Within this class I have a method that returns how many seconds remaining before the session expires. Also, Evey time the user refresh the page or open a new page (new request to the server) the idle time counter starts over $_SESSION['MA_IDLE_TIMEOUT'] = time()+900; What I am looking to do is display a dialog message 2 minutes before the PHP session expire and check if the user is still on the page or not. If the

User idle time while typing in input

淺唱寂寞╮ 提交于 2019-12-08 02:29:20
问题 The problem I'm having is a search function which should call my doSearch() -method after the user stopped typing for at least 100ms in my $("input#q) field. I tried to achieve this by using the logic of this answer, but I'm stuck with where I should set/unset the setInterval() which increments the idleTime . var idleTime = 0; $("input#q").keyup(function() { idleTime = 0; idleInterval = setInterval(function() { idleTimeIncrement(); }, 25); }); function idleTimeIncrement() { idleTime += 25; if