This project is example of multiple 'target' for one application.
This is an android project which shows how to use resources for specific client.
Scenario There is an advertising company which have a basic app with a screen on which company's name , tagline and logo are there. Suppose motorola and apple are clients of this advertising company. So now if company wants to manage single app and wants to export .apk using client specific resource. This project demonstrate best practice for such scenario.
Steps
- Created a new project named 'MobileCompany'
- Designed one sample activity layout with titleTextView, taglineTextView and Logo image
- Added two new library module named 'apple' and 'motorola'. Stackover flow question shows how to add library
- Added company specific resources in associated library module. For this project resources are company's logo, tagline, app-name, company's theme color.
- Goto project structure -> app (from left bottom pane) -> dependancies
- Add new module dependency and choose appropriate module (either of motorola or apple)
- gradle will take time to configure it self.
- Once gradle completes execution successfully run app.
- To change target got remove the older dependency which we included in step 6. and add other dependency.
- DONE!
References