I'm building an android app with 2 versions of paid and free. Basically I have a library project with all the logic and 2 skeleton projects for each version. Now I need some kind of build flags to distinguish between the versions. Is this possible?
You actually do not need build flag for that. Here is how you can achieve this:
<bool name="type.free">true</bool>
<bool name="type.free">true</bool>
<bool name="type.free">false</bool>
And then at any point in your Library Project you can check the value of Boolean resource and decide what you need to do. Of cource, you'll need access to Context
object for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With