Loading...

How to Launch Other Application From Your Android App Programmatically

In this post, I am going to share a simple tip: How to launch any other android application from your app programmatically using their package name. If you don’t have any idea to find package name of android application see how to find package name of android application from PlayStore and from android app manifest file.

Launching any other installed android app from your application is very easy, you just have to use little bit java code. There are many ways to launch other installed android app from your app but here you will learn one of the simplest ways.

In this example project I have added different buttons in XML layout file to launch different applications from your app like google chrome, youtube, facebook, twitter. To test either this is working or not you must have installed these applications on your testing device or emulator. While touching Click to Launch Google Chrome, chrome browser will be opened.

Related:
How to Get Current GPS Location Programmatically in Android
Android Studio is Slow: How to Make Android Studio Fast
How to Pick an Image From SD Card Gallery and Display in Android App

Example: Launch any Installed Application From Your Android App Programmatically


Following is the content of XML layout file and java activity file.


XML Layout File

Just add four buttons and give different onClick attribute name like below
res/layout/ launch_other_application_android.xml


Java Activity File

Following is the complete content of activity file.
src/LaunchOtherApplication.java

Strings.xml File

Default content of strings.xml file
res/values/strings.xml

Example: Launch any Installed Application From Your Android App Programmatically

That’s all. Now, run your Launch Other App From Your App and click different buttons to test. Make sure that you have installed these applications in your testing device or emulator.
Tutorial 592589572109335558
Home item