I am planning on implementing a reward system in my android application where users of the application can gain 100 points each day for opening the app. Users can only get 100 points at one given day no matter how many times more then once they open the app. I am not sure how I can go about doing this, for example, a application called WhatsChat, give users credits for opening the app each day:
I am trying to implement a similar system but instead only give users 100 points for opening the app each day. I understand I will need to keep track of the day and maybe store this in local storage using SharedPreferences
and keep record of the dates of each day and then increments the variable that records points by 100.
In pseudo code it would look something like this:
Set CreditsGained to 0
IF app launched for the first time on Current date THEN
CreditsGained = CreditsGained + 100
Else
Do nothing
How can I implement a such system in my application?