Dave's Brain

Browse - Programming Tips - How can I have multiple variants of an android app?

Date: 2017aug7
Language: Java
Keyword: demo, full, paid, free, flavor, flavor, flavour, flavours

Q.  How can I have multiple variants of an android app?

A.  Use "build variants".
https://developer.android.com/studio/build/build-variants.html

If you only want to change a bit of code you can do this:

if (BuildConfig.FLAVOR.equals("demo")) { // demo code }
Credit: reddit user AllanHasegawa

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.