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
Developer
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Application Development

I have developed small small applications. Now I want to design one application from which I want to call all my applications. It will be like when I click my main application, It have to display Icons of allready developed applications.

and when I clck on those Icons, that particular application shall have to start. Please if anyone have any idea about it, let me know?

Thanks in Advance.

Retired
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

Re: Application Development

One of the cleanest mechanisms is to use the ApplicationManager class and the runApplication method passing in the ApplicationDescriptor for the application you want to invoke.  There are a variety of ways to obtain the ApplicationDescriptor but the easiest (in my opinion) is to run your small underlying applications on startup and place the ApplicationDescriptor in a RuntimeStore which can then be read by your "main" application.

 

 

Mike Kirkup
Director, Developer Relations
Developer
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Re: Application Development

Thanks for Your guidance. But I don't have any idea about how to use ApplicationDescriptor and ApplicationManager.

Can you please explain by giving one short example of code?

Thanks again in advance.

Developer
Posts: 191
Registered: ‎04-03-2008
My Device: Bold 9700

Re: Application Development

try {

String moduleName = "net_rim_bb_lbs"; 

int index = 0; 

int moduleHandle = CodeModuleManager.getModuleHandle(moduleName) ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(moduleHandle); ApplicationManager.getApplicationManager().runApplication(apDes[index]); } catch (ApplicationManagerException e) { Logger.instance.logError(e); }

 

This is a simplified example.  You need to be careful about assuming that the descriptor you want is on index 0.  It's on 0 for most of the case, but there are some where it's got an alternate entry point on a different descriptor (the media manager "net_rim_bb_file_explorer" is an example that's at 1 instead of 0).
Developer
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Re: Application Development

Where I have to write this code? In the Class where MainScreen extended or in the Class Where main() function written? What is module name?
Highlighted
Developer
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Re: Application Development

Thanks Richard, Its Working. Thank you very Much. Smiley Happy