public boolean checkApk(String packageName) {
if (packageName == null || "".equals(packageName))
return false;
try {
ApplicationInfo info = getPackageManager().getApplicationInfo(
packageName, PackageManager.GET_UNINSTALLED_PACKAGES);
return true;
} catch (NameNotFoundException e) {
return false;
}
}
转载于:https://www.cnblogs.com/highfly2012/archive/2013/04/15/3021715.html