04-18-2012 01:42 PM
I am setting up my own online high score board for one of my games.
I want to make it so the user doesn't have to sign up or create an account, just click submit high score and it will do it whether they fill out the "name" field or not. So I need to default the name to something. I was thinking the pin number you get from DeviceInfo.getDeviceId() as I was already using it to keep entries unique (but not showing it on the board) but I think I need to obfuscate it or something.
Any easy ways to do that or another identifier I could use that is safer for the user?
Solved! Go to Solution.
04-18-2012 07:15 PM
The only issue I have with using device ID, is that users will loose this when they change phones. Our experience is that users can change phone every 6 months, whether because of breakage or upgrade is hard to say. But in an effort to make this process as simple as possible, we try to license by email account because people generally take that with them. They also take their phone number.
But to be honest, using the device's PIN is probably OK, if you don't think people will be too upset that they loose their high score when they change phone.
You should not publish the PIN number in any way as that can be used for things like BBM invites and PIN mails.
04-18-2012 08:21 PM - edited 04-18-2012 08:22 PM
Thanks, I think I will use it then. It's a simple game so I think the switching device thing isn't too big of a deal.
Now I just need to figure out how to generate a default unique name. I'd make it required but I don't even want to require unique names (thinking like old school arcade game) and I feel like once I require a name be entered I need to keep the names unique.
04-18-2012 11:26 PM
I have a suggestion.
Instead of making the user input his/her name for a high score, you can programatically do it by using UserProfile.getPPID(). In this way, the BBM Social Platform generates a unique string for the person's BBID. It will be the same if the user decides to switch devices. Since his device will always be associated with a BBID, and getPPID is dependant on BBID, no changes are required and the user will always preserve his high score.
There are however two caveats.
1) UserProfile.getPPID() API is dependant on using the BBM Social Platform which is available for all devices that are using OS 5.0+.
2) UserProfile.getPPID() is application specific. For my Bold 9900, I am going to have "ABCDE1234" as my PPID for foursquare, but the PPID for NobexRadio will be "1234A5123". It will only vary from BBM instance to instance, but the value will be the same within the same application.
Let me know if you have any questions and I will be more than happy to answer them for you.