I have a public transport app for one country and I want to create a separate app for another country. Most of the code will be shared, but I need some classes to have different implementations for example TransitProvider.
Is it possible to share code using Android Library Project? Can I do the following?
- Have TransitProvider (that extends AbstractTransitProvider) in the library project. The class has methods left unimplemented.
- In application project > AndroidManifest.xml I have different package name than in library's manifest. I have also TransitProvider in this project, that is in the same package as the library's TransitProvider.
- When I use TP in library project code, the implementation from app. project should be used (ie application project's TP overrides library's TP).