What i need is to do some maths depending on the time passed since the app was closed in the background and send notifications on the same device and stuff like that. Is it possible in gideros?
Yes, but you would need to schedule local notification while you are in the app.
What you want seems to be a background process, unfortunately not supported by Gideros, and even then don't really know how much useful would it be if it would be supported
I need my character to rest to recover his strength, but that take a certain amount of time so the user can stop playing and an hour later the game will notify him that is done resting. I suppose it cannot be done
The best way is to write some web service and store some data there. (So you can prevent cheating also.) -When the user will exit the game you will write the time he exited,his current hp and send it to the web service. In the server side (it can be php) you can calculate how much time you need for the full hp. -When that time arrives your server side will send a push notification to this device.
This schema will work but need a server side coding unfortunately. you can not do it only in client side.
What if you do your maths on app close, save results as "temp" and schedule the device notification after the time required? On app start you would check if the time has passed or not, and if it is, then you apply the temp result(s).
What I don't know is if you can cancel/update a scheduled local system notification with notification plugin..
As an example of why this should be needed: If the user restarts the app before the resting time is completed, does some stuff and then closes it again; the previous scheduled notification should be updated/delayed to the new "app closing timestamp".
If that could be done, you can avoid server side coding
Comments
What you want seems to be a background process, unfortunately not supported by Gideros, and even then don't really know how much useful would it be if it would be supported
-When the user will exit the game you will write the time he exited,his current hp and send it to the web service. In the server side (it can be php) you can calculate how much time you need for the full hp.
-When that time arrives your server side will send a push notification to this device.
This schema will work but need a server side coding unfortunately. you can not do it only in client side.
What if you do your maths on app close, save results as "temp" and schedule the device notification after the time required?
On app start you would check if the time has passed or not, and if it is, then you apply the temp result(s).
What I don't know is if you can cancel/update a scheduled local system notification with notification plugin..
As an example of why this should be needed: If the user restarts the app before the resting time is completed, does some stuff and then closes it again; the previous scheduled notification should be updated/delayed to the new "app closing timestamp".
If that could be done, you can avoid server side coding
I need location event data before notify the app..