Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

ng-idle not working for iOS in Ionic cordova #233

Open
girish-fuluskar opened this issue Feb 28, 2023 · 0 comments
Open

ng-idle not working for iOS in Ionic cordova #233

girish-fuluskar opened this issue Feb 28, 2023 · 0 comments

Comments

@girish-fuluskar
Copy link

Hi,

I have implemented ng-idle in ionic app. It is working as expected in Android, however it is not working for iOS. following are the details for the same along with code.

"name": "@ng-idle/core",
"version": "11.1.0",
"description": "A module for detecting and responding to the user becoming idle in Angular applications.",
"repository": {
"type": "git",
"url": "git+https://github.com/moribvndvs/ng2-idle.git"

Code:

this.platform.pause.subscribe(async () => {
this.updateAppCloseTime();
clearInterval(this.autoSyncInterval);
console.log('interval cleared');

  idle.setIdle(5);
  idle.setTimeout(1 * 60);
  idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);
  idle.setAutoResume(2);

  idle.onTimeoutWarning.subscribe((countdown: number) => {
    console.log("Timeout warning: ", countdown);
  });

  idle.onTimeout.subscribe(() => {
    console.log("Timeout");
    this.logout();
    this.timedOut = true;
  });

  idle.watch();
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant