So I'm trying to implement this Lives system that regenerates 1 Life every 20 mins -- even when the app is closed.
Logically, one has to record the time and date the person quits the app and compare that after re-launching the app with the current date.
IE. CurrentDate - QuitTimeAndDate = Minutes.
Then. CountdownTimerOfLives - Minutes.
I just don't know how to do the (CurrentDate - QuitTimeAndDate) part to get the difference in minutes. I've tried to play around with the Calender Entry and the Time and Date objects but I had no luck.
Otherwise, is there an alternative method to setup such a system without using servers?
Essentially, I just need to find out how many minutes have elapsed when the app was closed.