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: 235
Registered: ‎11-12-2008
My Device: Not Specified

Lauch app from another app..

Hi,

if we have an application ..from there clicking a button ,can we can another application(i.e means can we launch another application where app name is fixed).

Is is possible?if possible can anybody provide with a piece of code...Its urgent....

Thanks in advance

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10

Re: Lauch app from another app..

yes that is possible? you want to install new app on button click or want to open already installed app?
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Lauch app from another app..

Hi,

Thanks a lot ...

Please can you provide a piece of code for launching another app clicking on button.

Thanks

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10

Re: Lauch app from another app..

You want to open inbuilt app or third party app?
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Lauch app from another app..

want to open a third party application where name of the application is fixed?

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10

Re: Lauch app from another app..

Below is the way to open inbuilt apps

synchronized (Application.getEventLock()) 
{	    		
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(text)); }

 Messages should be open using this

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10

Re: Lauch app from another app..

and that third party app is installed on your device you want to run that
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Lauch app from another app..

yes ,thrid party application is install in my device ,,...and want to launch this third party application with a button click from my application...

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10

Re: Lauch app from another app..

[ Edited ]
int n = 0;
ApplicationDescriptor appDes[] = ApplicationManager.getApplicationManager().getVisibleApplications();
for(int i=0;i<appDes.length;i++)
{
if(appDes[i].getName().equals("APP_NAME"))
{				
n=ApplicationManager.getApplicationManager().getProcessId(appDes[i]);
ApplicationManager.getApplicationManager().requestForeground(n); break; } }
Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10

Re: Lauch app from another app..

try this code