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
Contributor
Posts: 22
Registered: ‎09-14-2010
My Device: Not Specified

Preventing other applications from launching my application

Hi,

 

Is there any way to prevent other applications from being able to launch my application? I just needed to know ff there is any such flag that can be set or something..

 

Any help would be appreciated.

 

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Preventing other applications from launching my application

Hi @sanika_sudhalkar

 

Have you application check if the args parameter of the main function contains a specific argument.

 

If it does, your application can continue.

 

If not, close the application.

 

You can add this argument in your application descriptor, in the 'Application argument' section.

 

E.

Contributor
Posts: 22
Registered: ‎09-14-2010
My Device: Not Specified

Re: Preventing other applications from launching my application

But if someone uses the same arguments to invoke my application, it will still work. From the security point of view, this will not be a sure shot way of preventing other applications from launching my app.

Highlighted
Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Preventing other applications from launching my application

That is the only way I know to prevent someone from launching your app. While it is not the most secure, unless you tell them the correct parameter, how would they launch it? The way I would go about it is to add a second entry point with a required parameter and just launch that second entry point when you main entry point is clicked. That way they can get all of your entry points but since the parameter is not listed anywhere and called directly by your application, the only way they could get the parameter is to decompile your app and look for it. This could be made more secure by not using a declared string, but building the parameter to launch from scratch.