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
nikita18
Posts: 144
Registered: ‎08-18-2012
My Device: Blackberry Curve 8520
Accepted Solution

How to launch BBM programmatically..

Is there any way I can launch BBM programmatically? Would appreciate any help.

 

Thanks..

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to launch BBM programmatically..

I don't know of an official way.
You can grab the module handle and use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html... most likely.
----------------------------------------------------------
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
nikita18
Posts: 144
Registered: ‎08-18-2012
My Device: Blackberry Curve 8520

Re: How to launch BBM programmatically..

[ Edited ]

Thanks for your repy simon_hain. I used the following to grab the module handle:

 

BlackBerryMessenger bbm= BlackBerryMessenger.getInstance();

 

int moduleHandle = CodeModuleManager.getModuleHandle("net_rim_bb_qm_peer");
ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(moduleHandle);
try {
ApplicationManager.getApplicationManager().runApplication(apDes[0]);
} catch (ApplicationManagerException e) {
// TODO Auto-generated catch block 
System.out.println("Exception: "+e.getMessage());
}

 

But now I'm getting a temp folder inside my Project Folder whenever I sign my app, because I have included the net_rim_bb_qm_platform.jar in my project. And after that an error mark appears on the Project folder. How to solve this? Please help. Thanks a lot. 

 

 

Developer
nikita18
Posts: 144
Registered: ‎08-18-2012
My Device: Blackberry Curve 8520

Re: How to launch BBM programmatically..

Got this working:

 

try {
			ApplicationManager.getApplicationManager().launchApplication("net_rim_bb_qm_peer");
		} catch (ApplicationManagerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 

 

Incase somebody else needs it. Thanks everyone for helping.

Contributor
maheshkumar1990
Posts: 44
Registered: ‎01-07-2013
My Device: 9300

Re: How to launch BBM programmatically..

Hi,

     I have tryed the code like this

protected void sendBBM() {
		BlackBerryMessenger bbm= BlackBerryMessenger.getInstance();
		int moduleHandle = CodeModuleManager.getModuleHandle("net_rim_bb_qm_peer");
		ApplicationDescriptor[] apDes CodeModuleManager.getApplicationDescriptors(moduleHandle);
		try {
		ApplicationManager.getApplicationManager().launchApplication("net_rim_bb_qm_peer");
		} catch (ApplicationManagerException e) {
			e.printStackTrace();
		} 
	}

 it's going to BBM menu in simulator. but, when i run in my 9300 Mobile its going to catch statement,BBM is not opening.Can yopu provide some solutoins to solve this issue

---------------------------

Thanks....