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);
	}
}