White Labeling Android App

I am trying to find the best method for white marking an Android application. Basically, I want to be able to create several versions of almost the same application, each version will have different resources (for example, shortcuts, colors, etc.), but they will share most of the code base. Some of the applications will also have additional features, so they will not be just clones of each other.

One of the methods that I thought of is to split the common code into a library, but the problem is that some of the common code includes actions, so I'm not sure how the resources can be changed in each application.

Another method will clone its own, but then any errors or changes in one repository should be applied to another.

Are there any other options? What is the best practice for code sharing, including actions, some resources, and other regular Java classes, between two Android applications?

+5
source share
1 answer

What is the best practice for exchanging codes, including actions, some resources, and other regular Java classes, between two Android applications?

With Android Studio and Gradle for Android, white labeling can only be a matter of customizing the tastes of the product for each client in this project. The common code and resources are located in src/main/ by default. Your additional code and resource overrides are included in src/whateverNameYouGiveYourFlavorForTheCustomer/ . Then, whether from Android Studio (viewing build options, docked to the left) or from the command line, you can create different application exits for each specific client.

You can also follow the library route. Resources of the same name defined in the application override resources from the library.

+10
source

All Articles