How do I programmatically launch a specific application?

Issue

I want to launch a specif application.

I know how to do Intents but I want to avoid the selection menu if there are multiple apps that can handle the intent, I want to go directly to a particular app. Hope this makes sense.

Solution

You use the package name / class directly, for example to create a new intent to call the twidroid program you’d use the followinglink text:

 Intent intent = new Intent("com.twidroid.SendTweet");

You’d probably want to put a try/catch around for a ActivityNotFoundException for when the application is not installed.

Answered By – stealthcopter

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published