Get Serial number of android device

Hi all, I’m working on a little app with a polling system . Now to make sure people don’t just uninstall the app and vote twice I’d like to put in a system where I get the phones serail number, check if that person already voted on this weeks poll, and if so reject the poll response .

Is this possible, and whats the best way to do this

I don’t think you need any device specific stuff just use player prefs to save The date Of last vote, and if they uninstall the prefs still stay. That way just code it so if they try to vote it won’t let them. EDIT: I’m sorry I’m wrong, no they won’t stay across uninstalls

The prefs still stay ? Well, that makes this very easy then , lol

Yeah, as long as all the app info stays the same, you keep the same names for the saved prefs, then it should stay even across versions and reinstalls EDIT: I’m not correct, uninstalls lose player prefs!

playerprefs dont stay (they stay across versions and reinstalls, but not uninstalls), you could save a file (your own player prefs) that stays. There is a way to get a unique id number, cant remember it off the top of my head though and not 100% on how unique it is.

http://docs.unity3d.com/Documentation/ScriptReference/SystemInfo-deviceUniqueIdentifier.html

Oh darn, that would have made it easy. Edited my post so people don’t waste time on it thinking it might work lol.

Sweat !

This should be good for the type of app i’m working on

Old thread, but in case someone stumbles in here, this is the answer: How can get android device SN code in unity3d ? - Questions & Answers - Unity Discussions

1 Like