0

[edit: answer]

  1. isInstalled("com.sec.android.app.samsungapps") is the correct packageName for determining installation of Samsung Apps.
  2. 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");

  1. Is this package name string correct for Samsung Apps?
  2. 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.

Community
  • 1
  • 1
unity303
  • 35
  • 6
  • [Duplicate of this](http://stackoverflow.com/questions/11392183/how-to-check-if-the-application-is-installed-or-not-in-android-programmatically). – JaKXz Mar 19 '14 at 00:45
  • No, this question is about 1) Samsung Apps correct package name, and 2) are there permissions that would block an app from detecting the existence. (I initially already linked to the "duplicate" at the end of my first line.) – unity303 Mar 19 '14 at 20:35

2 Answers2

1

There should be no reason why you shouldn't be able to check a package is installed, even system ones, however im unsure as to wether or not your samsung apps package name is correct but you can check what it is by using this https://play.google.com/store/apps/details?id=com...pkgnameviewer

Shayden117
  • 252
  • 1
  • 3
  • 17
0

1) Samsung Apps package name is "com.sec.android.app.samsungapps"
2) There are no restrictions on checking for package names using isInstalled()

unity303
  • 35
  • 6