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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone
Accepted Solution

What are all the ways we can open an app rather than clicking the app icon

Hi all,

What are all the ways we can open an app rather than clicking the app icon. Is it possible to open an app with another app with some keyword or something.....

Highlighted
Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: What are all the ways we can open an app rather than clicking the app icon

you can use ApplicationManager which provides two ways:
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html...
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html...

the second one is usually easier to use. you can modify the app descriptor if you want to add parameters in String[] args.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: What are all the ways we can open an app rather than clicking the app icon

i am able to launch only application that is running in the background..... How to launch the apps which is not in the background.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: What are all the ways we can open an app rather than clicking the app icon

Why do you say you can only launch background apps?

 

If you do a search round I think you will find other Threads that might be able to help you with this. 

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: What are all the ways we can open an app rather than clicking the app icon

[ Edited ]

This code returns me the apps which in the background

 

ApplicationManager manager = ApplicationManager.getApplicationManager();
ApplicationDescriptor descriptors[] = manager.getVisibleApplications();

try {
manager.getApplicationManager().runApplication(descriptors[2],
true);
} catch (ApplicationManagerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

 

 

And checked it with the below code 

String appname1 = "";
for(int i=0;i<descriptors.length;i++){
appname1 = appname1 +"\n"+ descriptors[i].getName();
}
LabelField field = new LabelField(appname1);
add(field);

 

it displaying only the apps which in the background...

 

However i will check other threads also....

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: What are all the ways we can open an app rather than clicking the app icon

I am able to launch an app with module name......

 

How to get the module names of all the installed apps in the phone?

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: What are all the ways we can open an app rather than clicking the app icon

[ Edited ]

I don't know of anywhere that is published or any way of finding that out vai an API, sorry. 

 

Edit: But SImon does... See below...

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: What are all the ways we can open an app rather than clicking the app icon

[ Edited ]

codemodulemanager

 

btw, if the original issue is solved, don't hesitate to mark the thread as solved and create a new one for a new question

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter