Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49355

setTimeout not working after a peroid of time on device

$
0
0

@wekas wrote:

I am using the code below to auto log out a user when the token is due to expire. It works fine on the Android device for short periods of time (5 mins) but when I test for the hour needed it does not log out the user.
Also the buttons are unresponsive after coming back to the app.

Any ideas why this is not working?

private autoLogout(duration: number) {
    if (this.activeLogoutTimer) {
      clearTimeout(this.activeLogoutTimer);
    }
    this.activeLogoutTimer = setTimeout(() => {
      this.logout();
    }, duration);
  }

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49355

Latest Images

Trending Articles


Telangana Ration Card Online Status Ahara Bhadratha Card Online Status


CalCen


Waves Complete v2019.02.14 Incl Emulator-R2R


[RELEASE THREAD]--_A-Team_--Cricket_Dream_5G


MCGEE, SAMUEL O., DECEASED, OF...


WordPress: Reverse Shell


GPGT - chio bu back from market kym


Ondonga king dragged to court


Justin Guy Ballou, III


Krupt Biography, Death, Songs, Photo, Video



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>