3

Depending on where the user downloaded an app, I'd like the application to behave slightly differently. I explicitly want to know whether it was downloaded from a public store (I don't care which store) or whether it was installed manually or through the Google Play Beta/Alpha 'store'.

So if it was installed manually, or via the Alpha/Beta channel, it acts one way, if it was installed from any public store (i.e. it's the consumer version) it acts another way.

Most answers on SO mention using 'PackageManager.getInstallerPackageName()' which will return null (or "") if it's manually installed, but is this guaranteed to be case if downloaded from the alpha/beta pipeline?

Thanks

Lee Winder
  • 857
  • 12
  • 35

1 Answers1

2

yes. it works. you must know the actual package name of the stores to compare.

Arnav M.
  • 2,590
  • 1
  • 27
  • 44
  • By your comment, do you mean the alpha/beta stores will have a different name from the public store, or that they will have no name? – Lee Winder Nov 04 '14 at 12:17
  • from alpha/beta you mean the app to be on playStore in alpha/beta version? – Arnav M. Nov 04 '14 at 12:19
  • 1
    there is no different store for alpha/beta/actual release on PlayStore so the installer packageName will be same always. – Arnav M. Nov 04 '14 at 12:27