如何检查android中的应用是否已成功安装?还有其他方法
private boolean isInstalled(String pack) {
PackageManager pm = getPackageManager();
boolean app_installed = false;
try {
pm.getPackageInfo(pack, PackageManager.GET_ACTIVITIES);
app_installed = true;
} catch (PackageManager.NameNotFoundException e) {
app_installed = false;
}
return app_installed;
}