Android App White Labeling [closed]

不羁岁月 提交于 2019-12-03 07:36:14

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!