• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android Prevent Repeated Freebies On Install

RizbIT

Member
Ok I have an game,

when users install the app you get a freebie 400 credits

you can use this in the game to buy things for free

but i only want to give free credits to NEW FIRST TIME user installs.

the credits will be stored in ini file

so the problem is user installs app, uses 400 credits, then unistalls and reinstalls the app, I assume then the previous ini file will have been deleted and the new one in the app will be created. But now the same user get 400 more free credits.

How do i prevent this without having to get users to create accounts with email verification?

Could i say get the users Play Store email somehow and then only give free credits if that user hasnt installed the app before?
 
S

Steevo

Guest
Being Android, couldn't you set up an award, badge, or personal high score?

Check to see if the user has any of these and if they do, chances are they have already received the bonus 400 credits.
 

NeoShade

Member
Why don't you make it so that before giving the player 400 credits, you game checks the ini file for a variable called "credited" or something similar. If the variable doesn't exist, then gift the player and set the variable to true, and save the whole lot to the ini file. If the variable DOES exist and is true, then don't gift the player. This way, if the player uninstalls and reinstalls the game without also deleting the ini file, then the game will know that the user has already been given the free credits. If they DO delete the ini file, then it will be a new save file, so they are entitled to the free credits.
 
  • Like
Reactions: Yal
Top