09-03-2009 11:15 AM
I have a program I am submitting to BB App World. I have a server setup to provide a dynamic key based on the PIN.
the detail I seem to be missing is the documentation that details how this "PIN" is generated by App World?
Can the user enter it (like their phone number or email address)?
Anyone have a pointer to an article that details this information.
Any help is appreciated!
09-04-2009 10:16 AM
AppWorld is a Java application running on the BlackBerry so it's grabbing the PIN just like how you would in your program. You have to get the PIN to validate the Dynamic License Key don't you?
So AppWorld will send you the correct, 8-character, Hexadecimal PIN number to you all the time. It's not like MobiHand or Handango where the customer types in the PIN -- they would type in the letter O instead of the number 0 so you would have to code for this or they would just type in a totally random number. AppWorld won't have this issue.
I hope this helps.
09-04-2009 10:44 AM
Thank you for the response. What I am looking for is a code example of how my app can extract the PIN while running on the users device so I can make the comparison to the key that have entered(or the one I extract from RIM_APP_WORLD_LICENSE_KEY).
09-04-2009 10:52 AM
Device.getDeviceId() - This retrieves the PIN number in Decimal Format.
Then use Integer.toHexString() to convert the decimal format to Hexadecimal format -- this is the PIN format we see if you go to the Options | Status screen in your blackberry and also the format that AppWorld sends to your dynamic licensing generator website.
Is this what you were looking for?
09-04-2009 11:54 AM
This is likely what I am looking for, but I am not seeing it RIM device java library definition. I see a deviceInfo class with a getdeviceid but a quick attempt to compile was unsuccessful. Can you point me to a code example online?
Thanks again for all your help.
09-04-2009 01:13 PM
My previous post has all the answers you need to get the job done. I would suggest not doing a quick attempt to compile but to look at your code in great detail beforehand. There are tons of examples online and there's also the RIM Device Java Library documentation. Here is the 4.2.0 version:
Remember that after you get the PIN number, you will have to decode your dynamic key as well.