public static boolean isAvilible(Context context, String packageName) {
try {
context.getPackageManager().getPackageInfo(packageName, 0);
return true;
} catch (NameNotFoundException e) {
return false;
}
}
public static boolean isAvilible(Context context, String packageName) {
try {
context.getPackageManager().getPackageInfo(packageName, 0);
return true;
} catch (NameNotFoundException e) {
return false;
}
}
本文标题:判断软件是否存在
本文链接:https://www.haomeiwen.com/subject/ptxvectx.html
网友评论