The Amazon Appstore is available on non-Kindle devices, and such devices are used during review. You cannot therefore rely on the manufacturer
.
There are three possible solutions I know of, although I haven't actually tried any of them yet, myself.
Check which market the app was installed from
PackageManager.getInstallerPackageName()
returns com.android.vending
when the app was installed by Google's Play Store, and com.amazon.venezia
when the app was installed from the Amazon Appstore.
However, if the app was side-loaded, this function will return null
, so in order to get through Amazon's review process you will have to default to presuming you're running on Amazon's platform.
Check if the app's signature has changed
Amazon re-sign your app. You can check to see if your app's signature is what it was when you signed it, and then act accordingly. You can find details of how to do this (using PackageManager.GET_SIGNATURES
) in Jakar's answer, here.
Just do separate builds
This is probably the most robust solution.