查看某个应用是否安装

PackageInfo packageInfo;
try {
	packageInfo = this.getPackageManager().getPackageInfo("com.bitcare.assistanasdft", 0);
} catch (NameNotFoundException e) {
	packageInfo = null;
	e.printStackTrace();
}
if (packageInfo == null) {
	System.out.println("not installed");
} else {
	System.out.println("is installed");
}

你可能感兴趣的:(查看某个应用是否安装)