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
I use:
try {
Intent intent = new Intent();
intent.setClassName("package.name", "");
startActivity(intent);
} catch (NameNotFoundException e) {
Log.e(TAG, e.getMessage());
}
But like Cami suggested this will work too:
try {
Intent i = ctx.getPackageManager().getLaunchIntentForPackage("com.twidroid.SendTweet");
ctx.startActivity(i);
} catch (NameNotFoundException e) {
Log.e(TAG, e.getMessage());
}