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 Contributor
kabadas
Posts: 7
Registered: ‎02-06-2010
My Carrier: MTS

Application protection from copiyng by users who didn't buy it

Hello.

We are worrying of using our application by users who don't buy it. It is because we don't understand how BlackBerry provides protection from copying the app which uploaded to App World. And documentation didn't help us (Yes, we read it).

Our application is "Paid" by license type. We will sell and distribute this application only via App World.
There are some license models for "Paid", we read about this. But we don't understand if we need to make changes in our code to check if user who runs the app already bought it.

I'll explain. To download paid app from App World, user buy it. It's clear. But next, after download it, it is possible to copy COD-files (via BBSAK, for example) to other device or other user who didn't buy it. Will the app work? Or we should add some code to make checks if it runs by user who really paid for it?

So, the question is what program code exactly we need to make checks if the app runs by user who really paid for it. Or we don't need to add any code and App World manages all copy protection without any code? Or we should choose special license model?

Please use plain text.
Contributor
tom_anmoney
Posts: 24
Registered: ‎05-29-2013
My Carrier: xxxxx

Re: Application protection from copiyng by users who didn't buy it

Honestly, I wouldn't worry about this too much.  Yes, you may use a small percentage of your sales to some very tech-savvy pirates, but I think the hassle of generating/keeping track of keys is not worth it.

Please use plain text.
New Contributor
kabadas
Posts: 7
Registered: ‎02-06-2010
My Carrier: MTS

Re: Application protection from copiyng by users who didn't buy it

Thank you for reply. I understand you may be right.

But the question is still not answered. Even BlackBerry Dev support didn't answer to me.

I want to know how that works, does anybody know?

 

Please use plain text.
Contributor
tom_anmoney
Posts: 24
Registered: ‎05-29-2013
My Carrier: xxxxx

Re: Application protection from copiyng by users who didn't buy it

My understanding is that Blackberry World does nothing and you are responsible to make sure the user is allowed to run the app.

 

If you have a single key, you need to verify that the user entered that right ke. This is useless as it is easier to distribute your key than your app.

 

If you supply Blackberry World with a pool of keys, they give the user a key, but it's your app and your server that needs to validate that the key is valid.

 

This is not like Google Play or Amazon where Google/Amazon does the hard work for you.  

Please use plain text.
Developer
QuiteSimple
Posts: 1,447
Registered: ‎11-06-2009
My Carrier: WiFi

Re: Application protection from copiyng by users who didn't buy it

There is the dynamic licensing as well. But you need an own server to generate the keys and your app has to validate the keys as well. It works like this: user buys your app, BBWorld sends request to your server with user PIN, your server generates a key and sends it back to BBWorld. After that the app validated if the keys is valid one.

 

While this approach offers the best protection so far, it has some drawbacks - for example user changing devices (PIN changes, but your key is bound to the old PIN of the user, so the app doesn't work on her new phone) etc.

 

Another approach would be to distribute your app as free trial and to use in-app purchases to unlock the full version. AFAIK in-app purchases are quite secure mechanism as well, but of course you need to add additional code in your app to handle this scenario.

 

My personal opinion: it is not worth the hassle, if you make enough sales, piracy is not a problem. And if you can't make enough sales, then piracy is again not the main problem.



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Please use plain text.
New Contributor
kabadas
Posts: 7
Registered: ‎02-06-2010
My Carrier: MTS

Re: Application protection from copiyng by users who didn't buy it

That's an answer. Thanks, guys.

So, it is up to developer to protect application, and now i need to find out what code to add for protection.

 

Interesting things i found:

RIM_APP_WORLD_PIN means The PIN of the purchaser and 

RIM_APP_WORLD_ID means The App World specific ID of this application

 

So, if understand correct, if app was downloaded from App World, it will have RIM_APP_WORLD_ID and RIM_APP_WORLD_PIN written into the COD-file. So we can do such check:

 

try {
                String myAppName = ApplicationDescriptor.currentApplicationDescriptor().getName();

		String pin = this.loadProperty(myAppName,
				"RIM_APP_WORLD_PIN");
		int base=16;
		if(pin.toLowerCase().startsWith("0x"))
		{
		   pin=pin.substring(2);
		}
		String appworld_id=this.loadProperty(myAppName,"RIM_APP_WORLD_ID");
		if (appworld_id!=null)
		{
			
			int pin_appworld=Integer.parseInt(pin,base);
			if (DeviceInfo.getDeviceId()!=pin_appworld)
				return; // and Dialog.inform("Incorrect license");
		}
		}
		catch (Exception e)
		{
}

 

So, if app was downloaded from App World:

  • device PIN = PIN of who bought and downloaded app, and the app will run

If app was sideloaded:

  • device PIN differs from RIM_APP_WORLD_PIN, and the app will not run

But this will work only if RIM_APP_WORLD_ID and RIM_APP_WORLD_PIN written into the COD-file when app downloaded.

 

Any suggestion, will it work?

Please use plain text.
Developer
QuiteSimple
Posts: 1,447
Registered: ‎11-06-2009
My Carrier: WiFi

Re: Application protection from copiyng by users who didn't buy it

I really can't help you here, I know how the things should work in theory, but I never used it by myself

 

You could ask for clarification in the Java Dev forum

http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Please use plain text.
New Contributor
kabadas
Posts: 7
Registered: ‎02-06-2010
My Carrier: MTS

Re: Application protection from copiyng by users who didn't buy it

Hello.

 

We decided to try by ourselves and posted an app with such code to App World and it was approved.

The app was not posted for sale yet.

We added test accounts to a Sanbox https://appworld.blackberry.com/isvportal/sandbox/

But we can't see our app in the App World.

Does it mean users in a Sanbox cant see approved app in the Appworld if it is not available for everyone yet?

Any option?

Please use plain text.
Developer
QuiteSimple
Posts: 1,447
Registered: ‎11-06-2009
My Carrier: WiFi

Re: Application protection from copiyng by users who didn't buy it

If I'm not mistaken there was a secret shortcut in BBWorld to bring up a dialog where you can enter the app SKU, so you can test purchases of an app, that is not posted for sale yet.

 

Ah, here it is

Here's how to test your app with a device running BlackBerry 7 or earlier:

1.Launch BlackBerry World and select an item from the carousel. 
2.Press and hold the alt key while pressing t, s, and t. 
3.When the dialog box appears, type the Content ID or SKU for your app and click OK. 
4.When the content page for your app appears, click Price. 
5.Enter your sandbox user ID and complete the purchase. 

 http://developer.blackberry.com/devzone/blackberryworld/testing_apps_with_a_sandbox_user_account.htm...



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Please use plain text.
New Contributor
kabadas
Posts: 7
Registered: ‎02-06-2010
My Carrier: MTS

Re: Application protection from copiyng by users who didn't buy it

Thank you for advise, i downloaded my app.

But the bad thing the code i posted earlier doesn't work :smileyhappy:

So, if developer need protection, developer need keys for the app.

Please use plain text.