What is the best practice for sharing code, including activities, some resources, and other regular java classes, between two Android apps?
With Android Studio and Gradle for Android, white-labeling can be just a matter of setting up product flavors per customer in that one project. Your common code and default resources go in src/main/
. Your additional code and resource overrides go in src/whateverNameYouGiveYourFlavorForTheCustomer/
. Then, whether from Android Studio (Build Variants view, docked on the left) or from the command line, you can build the different app outputs for each customer-specific flavor.
You are also welcome to go the library route. Resources of the same name defined in an app override the resources from a library.