I'm developing an app for both Google Play and Amazon Store. And the markets have some difference, fox example: the link to download app page. Thus, my apks have a little diffrence. I don't want to replace all of them for every build/sign apk. Does anyone have a solution? Thanks for your helping!
Android - Build two version of the same app
334 views Asked by Justin At
2
There are 2 answers
2
On
For this particular issue with "Giving a rating option",
You can have the same build with conditional branches, which detects if a device is an amazon device or not.
if (Build.MANUFACTURER.contains("Amazon"){ // Show amazon store page } else { // Show google page }
If you are also building for Samsung store, then it gets a little tricky, because, you would then want to know if your build has been installed through the Samsung store or the Play store.
For that, you will need 2 different builds.
Or you can use the new API, that tells you who installed the app. (from @Aelexe's link to another question)
If you created two identical APK's but signed them using different keys, you could then use some code to determine what to display in the application based on the key signature.
Someone has done something similar here: Detect if app was downloaded from Android Market