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

BlackBerry® World™ Development

Reply
New Developer
mike240se
Posts: 113
Registered: ‎02-21-2009
My Device: Not Specified

Re: Dynamic Licensing and Automated License Key Capturing

still want to find out if codemodule is working for reading the key.

 

also what about try and buy?  i assume that it wont work for that since they wont be reinstallting the app right, just getting a key?

 

also what is the story on the ip addreses?  there is still no way to secure who gets keys from our dynamic scripts, right?

Please use plain text.
Developer
RLord321
Posts: 343
Registered: ‎02-23-2009
My Device: 8700 | 8310 | BOLD | STORM

Re: Dynamic Licensing and Automated License Key Capturing


mkirkup wrote:

The Dynamic Licensing mechanism is a commonly used mechanism within BlackBerry App World for developers to provide a license key for every single user based on unique user information such as the PIN or email address.

 

One of the challenges associated with using Dynamic Licensing is that users will be shown the license key upon purchase of an application and will then have to manually enter that license key into the application.  In an effort to improve this experience, during installation of the application on the device, the App World client will load the license key in the CodeModuleGroup properties so an application can read it directly without having to prompt the user.

 

Your application should use the following line of code to access the license key in this scenario.

 

 

String key = CodeModuleGroup.load("My App").getProperty("RIM_APP_WORLD_LICENSE_KEY");

 


 

 

Of course, "My App" is the name of your application rather than the placeholder.  Note by "name" I am referring to the name of your application as submitted to the App World Vendor Portal.  Not the cod file name.

 

 

Message Edited by mkirkup on 03-17-2009 01:52 PM
Message Edited by mkirkup on 03-17-2009 01:52 PM

 

I downloaded my own App from App World and the above code that I implemented does NOT work.  Is this working for anyone else?  I am using the name I used when I submitted my app via the vendor portal in place of "My App" but it's still not working.

 

On the other hand, App World does present the user with a Copy function to copy the License Key on the clipboard and then they can paste it in so this is not so bad...but it still would be cool to have it unlock automaically...

Please use plain text.
Developer
SunnyDee
Posts: 75
Registered: ‎01-28-2009
My Device: Not Specified

Re: Dynamic Licensing and Automated License Key Capturing

Not working for me either.

 

Were you able to connect the device you downloaded it to, to the debugger and then write a small program to see what's returning you null, the CodeModuleGroup.load method or the getProperty method?

 

 

Please use plain text.
New Developer
mcmordie
Posts: 50
Registered: ‎01-22-2009
My Device: Z10
My Carrier: Rogers

Re: Dynamic Licensing and Automated License Key Capturing

I'm also intermittently getting user complaints about error 30509 following purchase-- about 30% of our sales are being reported with a key value of 'null'.  The output of my script looks as follows:

 

 

Content-type: text/plain; charset=iso-8859-1key=4ACA7095872C1BFC8870E8F578CFF5B6F8D05EDB7BC08D57D28037250C35B70E09A10F9A76089AE5

 

Not having this issue with the other two app sales sites I'm using, although their formats are slightly different.  My log files consistently show the right responses to RIM posts, and yet RIM is not correctly capturing the keys in all cases.  Web traffic to my server is relatively sparse, so I can't imagine that server congestion is the issue (at least not at my end).

 

What could be causing this?

 

Dave 

 

Please use plain text.
Developer
RLord321
Posts: 343
Registered: ‎02-23-2009
My Device: 8700 | 8310 | BOLD | STORM

Re: Dynamic Licensing and Automated License Key Capturing

mcmordie,

 

Are you setting the Content-Length?  Also, this is one HUGE key.  Does the size of the key change from user to user?  Maybe there is a size restriction.  Customers don't complain about entering this 80 character long key?

Please use plain text.
New Developer
mcmordie
Posts: 50
Registered: ‎01-22-2009
My Device: Z10
My Carrier: Rogers

Re: Dynamic Licensing and Automated License Key Capturing

  1. Yes, key length is ridiculous, and we will change this.  However, activation is either the RIM attribute in the cod file, or online, so the user should never actually have to enter it.  We also support copy and paste if the other two methods fail.
  2. We are not using the Content-Length property.  Could this explain it sometimes working and other times not?  
  3. If we need to add Content-Length, I take it from the rest of this post that the number assigned to this should equal the length of the body of the response (ie. starting after the last property in the header).  Is this correct?
Thanks for your help.
 
Dave
Please use plain text.
Developer
RLord321
Posts: 343
Registered: ‎02-23-2009
My Device: 8700 | 8310 | BOLD | STORM

Re: Dynamic Licensing and Automated License Key Capturing

  1. Have you seen the RIM attribute thing work yet?  I added the code for it and it doesn't pick it up. 
  2. Yes, adding the Content-Length property will probably solve your problem. 
  3. You are correct - it is the length of the body starting after the header.
Please use plain text.
New Developer
New Developer
jnh
Posts: 1
Registered: ‎04-22-2009
My Device: Not Specified

Re: Dynamic Licensing and Automated License Key Capturing

I'm coding for this, but it sounds like it's not working for anyone. Are all of you using:
String key = CodeModuleGroup.load("My App").getProperty("RIM_APP_WORLD_LICENSE_KEY");

which is deprecated. I think CodeModuleGroupManager is supposed to be used now:
String key = CodeModuleGroupManager.load("My App").getProperty("RIM_APP_WORLD_LICENSE_KEY");


Has anyone tried it with CodeModuleGroupManager?

 

Please use plain text.
Developer
RLord321
Posts: 343
Registered: ‎02-23-2009
My Device: 8700 | 8310 | BOLD | STORM

Re: Dynamic Licensing and Automated License Key Capturing

jnh,

 

It's pretty tough to test with App World.  If you think about it, since there is no test environment, you would have to make the change to an application, submit the app (subtracting one from your allocated 10 pack of app submissions), wait until it gets approved and download the game yourself to test it... I don't think that is worth it. 

 

I think at this time, someone from Blackberry needs to tell us how this works since no one is able to make it work.  And also maybe allow you to copy the key after the inital request to copy it -- you know how if you go to the game you downloaded, you see the key?  You can't copy it from there).

Please use plain text.
New Developer
mcmordie
Posts: 50
Registered: ‎01-22-2009
My Device: Z10
My Carrier: Rogers

Re: Dynamic Licensing and Automated License Key Capturing

RLord321: 

 

Thanks for your feedback.  I cannot confirm that the RIM attribute works-- based on everyone's else feedback I would assume no.  We have and online activation method from the app as a backup (runs once the first time the user runs the app), so I would guess this is why it works for us.

 

I've added the Content-Length property and will post back when I know if this cures the random null activation keys.  I suppose the other possibility is our unusually long key.

 

Dave 

Please use plain text.