{"action":"created","issue":{"url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode/issues/93","repository_url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode/issues/93/comments","events_url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode/issues/93/events","html_url":"https://github.com/katzer/cordova-plugin-background-mode/issues/93","id":81472115,"number":93,"title":"Problem with $interval( ... ) when phone not plugged to a computer.","user":{"login":"boltex","id":847716,"avatar_url":"https://avatars.githubusercontent.com/u/847716?v=3","gravatar_id":"","url":"https://api.github.com/users/boltex","html_url":"https://github.com/boltex","followers_url":"https://api.github.com/users/boltex/followers","following_url":"https://api.github.com/users/boltex/following{/other_user}","gists_url":"https://api.github.com/users/boltex/gists{/gist_id}","starred_url":"https://api.github.com/users/boltex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boltex/subscriptions","organizations_url":"https://api.github.com/users/boltex/orgs","repos_url":"https://api.github.com/users/boltex/repos","events_url":"https://api.github.com/users/boltex/events{/privacy}","received_events_url":"https://api.github.com/users/boltex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-27T14:32:59Z","updated_at":"2016-03-01T12:18:47Z","closed_at":null,"body":"using a timer to trigger stuff at a regular interval seems to work consistently while the phone is plugged to a computer. (to debug, monitor, etc... even when the phone locks and screen goes dark - or the app not longer in foreground, works fine) \r\n\r\nBut if the phone is not plugged to a computer, let by itself, the triggers do not happen consistently. only the first few. Then it skips, or does not trigger for long periods of time. and triggers again from time to time. inconsistently. \r\n\r\nHelp on this issue would be greatly appreciated! EDIT: i'm on android 4.4.2 phone"},"comment":{"url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode/issues/comments/190693819","html_url":"https://github.com/katzer/cordova-plugin-background-mode/issues/93#issuecomment-190693819","issue_url":"https://api.github.com/repos/katzer/cordova-plugin-background-mode/issues/93","id":190693819,"user":{"login":"aadon94","id":10036503,"avatar_url":"https://avatars.githubusercontent.com/u/10036503?v=3","gravatar_id":"","url":"https://api.github.com/users/aadon94","html_url":"https://github.com/aadon94","followers_url":"https://api.github.com/users/aadon94/followers","following_url":"https://api.github.com/users/aadon94/following{/other_user}","gists_url":"https://api.github.com/users/aadon94/gists{/gist_id}","starred_url":"https://api.github.com/users/aadon94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aadon94/subscriptions","organizations_url":"https://api.github.com/users/aadon94/orgs","repos_url":"https://api.github.com/users/aadon94/repos","events_url":"https://api.github.com/users/aadon94/events{/privacy}","received_events_url":"https://api.github.com/users/aadon94/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T12:18:47Z","updated_at":"2016-03-01T12:18:47Z","body":"Boltex (or anyone for that matter) I was hoping you could help me out. (preferably asap as I'm supposed to start my user evaluation for my dissertation really soon and need to get this bug ironed out.)\r\n\r\nI've got an app that I need to do stuff in the background while the screen is off. There's a stopwatch on the main page that I'm using (although the app does more than this).\r\nBasically, I'm using the same solution as you've mentioned above. And it has made it so when the screen goes off and I wait for a while and turn it back on, the timer has moved on from when I turned the screen off. But if I actually time it with a different stop watch, the duration between screen off and screen on is not reflected accurately by my app. Sometimes there's a difference of 10 seconds, sometimes a minute - possibly more. I'm really confused and hoped you could shed some light on it.\r\n\r\nAs a side note it's not just the timer that isn't being updated properly, im detecting sensors as well and they're not being monitored while the screen is off properly.\r\n\r\nThanks"}}