javaandroidmobilerestrictions

How to set a restriction for each phone/user on my app?


I'm starting to build an app where people vote certain stuff just by clicking on happy/sad faces (kind of like grading it). The thing is that I dont want to make a log-in nor registration for my app (the reason is a long story). So is there any way that I can limit people's vote to 2 per day? Every phone/user could only vote twice a day, and that count will reset after 24h from the first vote.


Solution

  • You have tow options: Limit the number of votes on the device, by saving the number of votes into persistant storage on the device with a timestamp and act accordingly.

    Or (more secure, but also more difficult)

    Track the installations as described here identifying app installation And send the id with every request and validate on the server side.