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

Native Development

Reply
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange
Accepted Solution

How to get dynamic licence key from Cascades

Hi,

 

Having spent all day reading up on generating license keys with the usual confusion that comes from RIM's documentation I can now implement a dynamic license system in Java.

 

The trouble is my apps in  C++/Cascades.

 

According to documentation its on the device in a key paring accessed by the CoreModule.

 

In Java you would do this after initialising the CoreModule;

  String lc = group.getProperty("RIM_APP_WORLD_LICENSE_KEY");

 

How do I retrieve it using cascades??

 

If this is not possible then second best how can I get the device id?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to get dynamic licence key from Cascades

As far as we know, there's no support for programmatically getting a license key in any of the OSes except BB OS. I've got an unresolved thread on this issue http://supportforums.blackberry.com/t5/BlackBerry-App-World-Development/Programmatic-access-to-licen...

I would expect that post-launch we'll finally be able to shake a reasonable answer loose, but don't hold your breath for anything on this.

For device id, there should be a permission for that, something like device_identifying_information.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to get dynamic licence key from Cascades

Cheers Peter, so I wasted a whole weekend trying to look for something that doesnt seem to exist.

 

The number of times this happens really puts you off coding for BlackBerry.

 

AND FOR ANY BLACKBERRY PEOPLE READING THIS, THIS SLOWS UP DEVELOPERS PUTTING APPS OUT!

 

That is what you want right, apps? because at the moment it doesn't seem like it.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790
My Carrier: Orange

Re: How to get dynamic licence key from Cascades

If you are using the integrated Payment Service you can read the license key from the PaymentReply (PurchaseReply)

Here is an example of my slot:

void Charger::smileytongue:urchaseFinished(bb::smileytongue:latform::smileytongue:urchaseReply* reply) {
if(reply->isError()){
//An error occured
qDebug("An error ocured");
qDebug()<<reply->errorText();
qDebug()<<reply->errorCode();
}
else{
//No error
qDebug("Purchased");
qDebug()<<reply->receipt().licenseKey();
}
}
Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to get dynamic licence key from Cascades

BBSJdev, why not just launch the app without it bothering about reading its key for now? What would the impact of that be?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to get dynamic licence key from Cascades

Doesn't that negate the point of licensing, why offer the option if it's not there?

 

A little note next to the licensing option when you add your app saying 'Oh by the way you can't do this on BB10' would stop a lot of wasted effort.

 

The Dynamic option gives me the opportunity to log 'legitamate' users and hopefully slow down any pirating of the app.

 

I have implemented this now but I've got a sneaky suspicion its not going to work, it all hinges on whether the license is injected in to the package before its downloaded from App World.  I'm trying to find that out currently.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to get dynamic licence key from Cascades

**bleep** it!

 

Garett, if you're out there, I'm getting an error message that the Dynamic Licensing issue is closed and the site now seems to be under maintenance.

 

Simple yes or no question.

 

Is the licence key, requested by RIM, from my license server injected in to the BB10 bar package before download???


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to get dynamic licence key from Cascades

[ Edited ]

Just do a quick search on 'download bar file [popular app]' to see how rife piracy is and how easy it is not to pay for an app.

 

If RIM have changed something in BB10 to make this less easy then I'd like to hear about it.

 

I thought when I clicked on Dynamic Licensing on submitting my app it would be 10 minutes of work to implement after all I've done this kind of thing before on other systems, instead its turned in to a weekend lost and an app update sitting ready to submit but unable to until I get an answer on exactly whether it will work or not.

 

 

Plus I've read changing the licensing option is a nightmare in itself (delete and resubmit) and potentially could put me the wrong side ot the 10k deadline.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to get dynamic licence key from Cascades

BBSJdev, if you'd like to hear about it, then yes, RIM has certainly changed something in BB10.

 

At least initially, it seems highly likely that there will be NO piracy, unless a developer chooses to deliver his .bar file to people he shouldn't have trusted.

 

The only caveat that I'm entirely unclear about is with the "corporate shelf space" in BlackBerry World. If that involves copies of our apps actually being delivered through a corporation's network, unencrypted, or transferred to their servers and stored there, then obviously there will be hundreds of attack surfaces available to hackers.

 

If, however, it's still all direct from BB World, then we may have quite some time before there's any piracy. Conceivable even that the platform will be immune... I can't say how likely that is.

 

It's certainly the case that piracy will be non-existent on Day One, unless there are people out there who have managed to root BB10 already (and they have a tendency to crow about it when they do for the brownie points, so chances are they have not, yet).

 

As for the 10K deadline, that's already passed, so I'm not sure what you mean about that.

 

(Please also keep in mind that ranting in this thread doesn't really help you get others like me, who contribute our time voluntarily, to help you. I've got too much to do to spend my days sifting through negativity to find the actual questions.  Thanks! :-) )


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to get dynamic licence key from Cascades

Thanks for your response.

 

I'm not quite sure where you got the ranting negativity bit from.

 

I too sift through the posts here and help where I can but recently I've been stuck because of simple lack of documentation about licensing.

 

You seem to know whats going on so perhaps you'd like to say where you picked it up from as I obviously missed the easy link to 'Dynamic licensing doesn't work for BB10' that you so obviously did when first coming across the option in the Vendor Portal?

 

If you can point me to that link I'll happily recant my 'rant' on a lack of documentation and consistancy.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.