I develop a software for multiple customers based on the same core library (which contains the whole UI and all the business logic). If everything was simple, I would reference that library from starting projects and modify the different label in the core library with a variable.
For example :
Core library : com.test.core
package (and apk) 1 : com.test.core.customer1
apk 2 : com.test.core.customer2
Final result : some modification in the ore package depanding of the starting package (labels etc.).
I tryied to change the language on the starting package (for example package1 = fr, package2 = es) : Launch an android application with different resource file
But the drawback is really simple : if I use some Android features, like copy/paste, the wrong language will be showed.
An idea would be to configure eclipse with ant (or something like this) to modify at the compile time on the fly the values/strings.xml package when I compile customer1 or customer2 but I don’t know how to do this.
I use Eclipse Juno with applications using android >= 3.2.
Regards
This case can be resolved with ant.
I downloaded ant-contrib and put it on C:\ant-contrib\ant-contrib-1.0b3.jar
In the project I created the file specific/lm/strings.xml.
I created the custom_rules.xml file and launch it with ant.
It use the lm property which should be set to true. You can also use the target lm.
you can also use maven Skinning Android app with Maven build profiles