How to manage multiple versions of the same Android application

I have 3 editions of my Android app. one free with advertising, one paid and one branded by CI.

therefore, the difference between them is minimal.

What is the best practice for managing multiple versions of this application.

  • one project, in code if (editionA) { ... }
  • several projects, a link to a common code in an additional project
  • or something else?
+6
android eclipse
source share
4 answers

Update by reference and detailed description;
1. Library modules
2. Setting up the library project


Use the Android library project for generic code, with tiny projects for every specific taste.
+8
source share

I am doing something similar with my applications. A common code base, several different sets of resources. I have a python script that copies my shared source from a shared location to the src directory, copies the res_project directories to the res directory, updates the package names to reflect the new application package, and updates AndroidManifest with the appropriate values.

I felt that there should have been a better way to do this, since your resources are already well separated from your source, but there were problems with the application package name, which was different from my src package name. I spoke in detail about this process here .

+2
source share

I would say 2, provides maximum flexibility + you can have different package names so that you can install them on your device at the same time (if you need / need)

+1
source share

Create a master activity that has all the functionality, uses supporting actions and layouts for the three types of access?

Thus, you need to support only one design and core functionality.

Just start the initializer at startup, which determines what activity should be started.

+1
source share

All Articles