Page 1 of 1

How to trigger event on install of an app

Posted: Wed May 28, 2014 5:03 pm
by Deki

I'd like to trigger a timer event only once as soon as after the app is installed and run for the first time. I want to start the timer when the app is run for the first time and I need to keep that timer going every hour until the lifetime of the app...Any ideas on how to do this sort of thing? Thanks


How to trigger event on install of an app

Posted: Wed May 28, 2014 5:36 pm
by Evgene Karachevtsev

Hello Deki,

Could you please tell us what are you going to do if the device would be turned off? How do you start the timer again? Maybe it would be better if you save on the first deviceready event current date to local storage and when you need value from timer just get the difference between new Date() and value from local storage.


How to trigger event on install of an app

Posted: Wed May 28, 2014 7:15 pm
by Deki

Ok, I see it might be an issue doing this on the client side. But how about on the server side? I see that I can schedule a job to run hourlly, but my problem is getting data from the client to the server. My goal is to run a script hourly to get the date on the client. Any ideas on how this might be done?


How to trigger event on install of an app

Posted: Wed May 28, 2014 8:42 pm
by Evgene Karachevtsev

Deki,

If you want schedule server code we have such posibility: http://devcenter.appery.io/documentat...
For passing data from mobile devices to server you can use either database service or server code service
http://devcenter.appery.io/documentat...