Launch other application from your application in Android

protected void launchApp(String packageName) {
	Intent mIntent = getPackageManager().getLaunchIntentForPackage(packageName);
	if (mIntent != null) {
		try {
			startActivity(mIntent);
		} catch (ActivityNotFoundException err) {
			Log.d("Shingu","App not found");
		}
	}
}
Advertisements

Get List of Installed packages in Android

To get the list of packages installed in the android, use below code.
More details @developer.android.com

protected void print_installed_pkgs() {
	final PackageManager pm = getPackageManager();

	//get a list of installed apps.
	List InstPackages = pm. getInstalledPackages(PackageManager.GET_META_DATA);

	for (PackageInfo packageInfo : InstPackages) {
			Log.d("Shingu", packageInfo.packageName);
	}
}