What is the recommended best practice for determining at runtime if an app was installed via the Amazon Android Appstore or Google play? I would like to avoid generating separate APKs for each appstore in which my apps are available.
My preferred approach would be to use PackageManger.getInstallerPackageName.
According to the Android API documentation this is exactly what I'm looking for: Retrieve the package name of the application that installed a package. This identifies which market the package came from.
Unfortunately it appears that apps installed via the Amazon Appstore (including KF) return null which is what one would expect only when the user manually installed the APK.
Can somebody let me know if there is another method to do so.