[edit: answer]
isInstalled("com.sec.android.app.samsungapps")
is the correct packageName for determining installation of Samsung Apps.- AndroidManifest: There are no special permissions required.
[original post]
Trying to find out whether Samsung Apps is installed. Based on the method provided in this link.
I want to detect if:
isInstalled("com.sec.android.app.samsungapps");
- Is this package name string correct for Samsung Apps?
- Is there a security/permissions scenario where I might not be able to find out about the existence of other installed packages?
For reference, here is isInstalled()
:
private boolean isAppInstalled(String packageName) {
PackageManager pm = getPackageManager();
boolean installed = false;
try {
pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
installed = true;
} catch (PackageManager.NameNotFoundException e) {
installed = false;
}
return installed;
}
Thanks.