I have published a paid Android app on Google Play. Since it's paid I have implemented License Check to ensure that the app is used only by purchasing it. But for Amazon, when I test it before publishing I received the issue: External market links detected. This issue disappears only when I remove LVL from the app. Is there a way to keep LVL or dinamicaly add LVL at runtime or not according to the targeted store? My target is to avoid having two projects for the same app.
Asked
Active
Viewed 353 times
0

John Rotenstein
- 241,921
- 22
- 380
- 470

blavi
- 531
- 1
- 10
- 26
-
Using Gradle for Android, you will be able to have one project with two "product flavors", one for the Google ecosystem, one for the Amazon ecosystem. You can have some common source used by all flavors, plus flavor-specific source, such as having the LVL code only be in your Google flavor. You then get a per-flavor APK file as part of the build process, to upload to that ecosystem's distribution channel (Play Store or AppStore for Android). – CommonsWare May 09 '14 at 13:13
1 Answers
0
I had the same problem. I solved it using Gradle flavors and creating classes that contain all the information related with the Market:
public class MarketInfo {
public static final String MARKET_ID = "amazon";
public static final String MARKET_NAME = "Amazon Appstore";
public static final String MARKET_URL = "amzn://apps/android?p=com.meetsapp";
public static final String MARKET_ALTERNATIVE_URL = "http://www.amazon.com/gp/mas/dl/android?p=com.meetsapp";
}
Later I put those classes in the path of the project and configure the build.gradle file:
productFlavors {
google {
versionName '1.3.7-beta'
}
samsung {
versionName '1.3.6-samsung'
}
amazon {
versionName '1.3.6-amazon'
}
}
Finally I compile my project with:
./gradlew assembleAmazonRelease

MartinCR
- 658
- 6
- 7