Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
ljdarten
Posts: 100
Registered: ‎03-16-2011
My Device: curve
My Carrier: sprint
Accepted Solution

use blackberry pin for online high scores

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?

 

thanks.

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: use blackberry pin for online high scores

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. 

Please use plain text.
New Developer
ljdarten
Posts: 100
Registered: ‎03-16-2011
My Device: curve
My Carrier: sprint

Re: use blackberry pin for online high scores

[ Edited ]

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.

Please use plain text.
BlackBerry Development Advisor (Retired)
rmasroor
Posts: 172
Registered: ‎06-07-2010
My Device: BlackBerry 8520
My Carrier: Rogers

Re: use blackberry pin for online high scores

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.

Raihan Masroor
BlackBerry Development Advisor
Please use plain text.
New Developer
ljdarten
Posts: 100
Registered: ‎03-16-2011
My Device: curve
My Carrier: sprint

Re: use blackberry pin for online high scores

That sounds like exactly what I need. Only problem is I would need to add an sdk just to add that id. I'll look into it at least.

thanks!

Please use plain text.