moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

onIdleTimeout is not triggered when app goes to background in iOS #136

Open coolvasanth opened 4 years ago

coolvasanth commented 4 years ago

Describe the bug I have an Ionic app, in Android everything works as expected. But in iOS when app goes to background the time elapsed is not considered. For ex: If I'm tracking for 120 seconds and app goes to background at 80th second and comes back to foreground, then time tracks from 80th second only. Time elapsed in the background is not considered.

To Reproduce: You can use iOS device with running iOS 12 or 13. And test the Description explained.

Expected behavior : Even when app goes to background, the time elapsed should be considered.

Environment:

skyleguy commented 4 years ago

This is the feature I was going to use this package for. Would really love to see this fixed!

mychalhackman commented 4 years ago

https://github.com/moribvndvs/ng2-idle/pull/131 has a PR for the fix back in Sept

komalpopli commented 1 year ago

a similar issue is happening with me when idle.onTimeout is not firing when the app is running in background for chrome and edge but is working fine for firefox. I am sure it is because of background task suspension in chrome and edge but the library should have a solution for that.

girish-fuluskar commented 1 year ago

I am also facing the same issue but only for iOS. For Android it is working as expected but for iOS it is not working. Does anyone have any solution for the same?

s-ramesh commented 5 months ago

I am also facing the same issue but only for iOS. Does anyone have any solution for the same appreciated?