Android build flags?

I am creating an Android application with two versions of paid and free. Basically I have a library project with all logical and 2 skeletal projects for each version. Now I need some kind of assembly flags to distinguish between versions. Is it possible?

+5
source share
1 answer

You do not need the build flag for this. Here's how you can do it:

  • In your library project, specify the resource: <bool name="type.free">true</bool>
  • In your application, which should be free: <bool name="type.free">true</bool>
  • In your application, which must be paid: <bool name="type.free">false</bool>

, . , Context.

+6

All Articles