protected boolean isAppExist(String pkgName) {
ApplicationInfo info;
try {
info = getPackageManager().getApplicationInfo(pkgName, 0);
}
catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
info = null;
}
return info != null;
}
网友评论