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

New Contributor
Posts: 5
Registered: ‎05-03-2010
My Device: 9700
My Carrier: AIRTEL

Application Launch using ApplicationManager API

Hi All,


I am using ApplicationManager class to launch my application programatically by passing launch arguments in ApplicationDescriptor. Generally, the launch is successful and the parameters i passed can be retrieved in args[] in main method. But occasionally( rather rarely), the args comes as null. This behaviour is random and there is no pattern in its occurrence. I am stuck with this issue as i am not able to understand the root cause of the issue. Appreciate any kind of help. The code i use looks like this. args is a String[] that i have created and initialized earlier in the code.


 ApplicationDescriptor descriptor = new ApplicationDescriptor(
                          desiredModule, args);
try {
              catch(ApplicationManagerException e) {
                       return false;




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

Re: Application Launch using ApplicationManager API



I think the first step you need to take is to gather more info.


I suggest adding logging before and after the creation (and assignment) of args and before and after the call to the 'runApplication' function.


This will allow you to pinpoint the problem and handle it accordingly.