Page 1 of 1

Time out and redirect

Posted: Thu Jul 19, 2012 9:04 am
by Geeth

Hi

I wonder weather I can set a time out if user does not do anything in two minute.

My steps are as follows

  1. In the first screen user enters the pin and validated then redirected to next page (from the next page onward only a validated user can view the data)

  2. if user does not interact with the app for two minutes I need to redirect the app to first screen where he has to enter the pin again.

    Upto now I have done validating user and redirecting viewing the data.
    But I am looking for a way to redirect the user to first page if he has not done any anything within 2 minutes.

    Please guide me if you know how to do this.

    Thanks


Time out and redirect

Posted: Thu Jul 19, 2012 1:32 pm
by maxkatz

Yes, you can do that, you just need to run JavaScript to start the timer and navigate when time expires.

Tiggzi is an app builder, you are creating an HTML5 app (+PhoneGap). You can do anything you want with JavaScript and what the browser supports.


Time out and redirect

Posted: Thu Jul 19, 2012 2:30 pm
by Geeth

How do I detect if user is doing something or not?
I mean if he is even touching the ui time out should not happen?

Would you please give some steps to follow

Thanks


Time out and redirect

Posted: Thu Jul 19, 2012 4:43 pm
by maxkatz

Every time a user does something, you can save the time of the action (in local storage). Next time the user does something you can check how much time has passed. That's one way. I'm sure there are other ways to do this.