2

I build an android and ios application with cordova and jQuery mobile. I would like to do a countdown in my application in order to limit the time of utilization. When a member is registered, he will have 48 Hours to use the application (for example). I'm a novice person so I don't really know how to do that.

Have you go an idea or do you know a plugin to do that?

Thank you.

3 Answers 3

0

You can use the phonegap-SQLite plugin

2
  • It don't seems to be a countdown plugin. What can I do with this plugin I don't really understand sorry :S Jun 27, 2013 at 20:03
  • 1
    You store the date in which a member is registered and on each page that this user can access you retrieve from the database such date. Then you compare the stored date with the actual date to check if the difference is bigger than 48 hours. Jun 27, 2013 at 20:05
0

Just take in mind that you may want to do that server side, if you just validate the time that has happened since user registration in the client side, e.g your android application, he or she may override your validation , so it is better if you do it with a web service or whatever server side.

0
0

Try this:

var count = 0, timer = setInterval(function(){ 
    count = count + 1000;
    if(timer >= 172800){ alert('Your session has expired.'); } 
}, 1000);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.