Opening Other Applications from our Application in Android

by Sasikumar 2014-03-31 14:09:11

To open other applications from our application use the following code :
PackageManager mypackageManager = getPackageManager();
Intent myintent = mypackageManager.getLaunchIntentForPackage("packagename"); //eg. packagename is com.android.log
startActivity(myintent);

To open other applications activity from our application use the following code :
Intent myintent = new Intent(Intent.ACTION_MAIN);
myintent.setClassName("packagename","activityname");//eg. packagename is com.android.log ; activityname is com.android.log.Mainactivity
startActivity(myintent);
1070
like
0
dislike
0
mail
flag

You must LOGIN to add comments