Skip to content Skip to sidebar Skip to footer

Launch An Installed App With My Own By Pressing A Button

How can I launch an app (3rd party app) that is installed on my phone with my own app? I'm having several buttons in my app and when one has pressed an app that is installed shoul

Solution 1:

You can launch a different app from your application on click of a button or something with the package name and if you dont know the launching activity of the application to be opened..You can use this

IntentLaunchIntent=     getPackageManager().getLaunchIntentForPackage("com.package.address");
startActivity(LaunchIntent);

and if you know the launching activity also which you can see from the manifest file of the app to be open then use this.

Intentintent=newIntent(Intent.ACTION_MAIN);
intent.setComponent(newComponentName("com.package.address","com.package.address.MainActivity"));
startActivity(intent);

Post a Comment for "Launch An Installed App With My Own By Pressing A Button"