5

I know how to check:

 packageManager.getInstallerPackageName(pContext.getPackageName())

I know from other StackOverflow answers and my apps in the wild that:

Google Play returns: com.android.vending

Amazon returns: com.amazon.venezia

If I install with adb I get null value returned from getInstallerPackageName(). Anyone know how to test if install is from Samsung App store?

Szymon
  • 42,577
  • 16
  • 96
  • 114
Stanley
  • 1,421
  • 5
  • 19
  • 36
  • I do not have a Samsung device, but I would assume it would be something like com.samsung.* So if you were to search the string the above method returns for the string "samsung" you should be good. I wouldn't imagine there are very many package installers with the string samsung in it. – EliteTech Oct 02 '13 at 19:56

1 Answers1

4

According to the Samsung forum thread getInstallerPackageName will return null:

Actually, the value is not being set (the method returns null) when you download an application from SamsungApps. This method is an unreliable source of information in this case.

Regards, Artur Stepniewski Samsung Developers

This is also what I get using a small test application.

orcy
  • 1,304
  • 14
  • 29