I would like to check if a package is installed in my app. How I can do that ? I need to add some permission for that ?
Thanks
I would like to check if a package is installed in my app. How I can do that ? I need to add some permission for that ?
Thanks
Try this
PackageManager pm = getPackageManager();
boolean app_installed;
try {
pm.getPackageInfo("PackageName",PackageManager.GET_ACTIVITIES);
app_installed = true;
}
catch (PackageManager.NameNotFoundException e) {
app_installed = false;
}
And see this