任何人都可以说如何在设备中安装市场应用程序的应用程序ID。我想获得特定安装的应用程序的ID?
答案 0 :(得分:1)
boolean installed = appInstalledOrNot(Your App Package as String);
if(installed){
////////App is Installed
}
private boolean appInstalledOrNot(String uri) {
PackageManager pm = getPackageManager();
try {
pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
return true;
} catch (PackageManager.NameNotFoundException e) {
return false;
}
}