Supporting Amazon and Android market (Google Play) links inside application

user432209 picture user432209 · Mar 30, 2011 · Viewed 8.5k times · Source

So one of my applications was rejected from the Amazon app store today. The reason was because inside my app, I linked to the paid version of the app on the Android market. Disappointing, but whatever, I guess everyone wants their cut...

So now I'm left having to modify the application to change the Android market link to an Amazon app store link. Not really a big deal except for now if I do that I'm left with a discrepancy when I want to upload a newer version back to the Android market. After all, it would be rather dumb to link someone to the Amazon app store if they purchase the app from the Android market.

Now we all know that it is a pain supporting/managing multiple versions of the same app. Consequently my question becomes how can I link to both at the same time? Is there a way to tell where an app was downloaded from so I can code both links into the app and thus point the user automatically to one or the other? Secondly, is it against the Amazon TOS to give the user a choice (say I pop up a dialog instead and ask the user where to download from)?

Thanks all.

Edit: Direct from Amazon customer service "Re: Link to both markets" (I wish the approval process was as fast as these guys):

For the time being, we need any linking to point back to the Amazon Appstore only for market links. Linking to your website is allowed, just not other markets.

When pointing to other apps from within your app, including up-sells, completion of purchase must be from the Amazon Appstore.

Answer

mttmllns picture mttmllns · May 31, 2013

Good news! Apparently the latest version of the Amazon store finally sets PackageManager.getInstallerPackageName() to "com.amazon.venezia" to contrast with Google Play's "com.android.vending". This will be the easiest way to determine if your app is sideloaded, installed from Amazon, or installed from Google.