I am doing an Android application and want to release it in a full and basic version. As pretty much all of the code and resources are identical in these two I was wondering if anyone knows a recommended project setup in Eclipse to manage this?
I was trying to go with links and virtual folders but the R file generation seems to break if I do that.
I think the proper way would be to split project into (at least) 3 subprojects:
com.example.app.lib,com.example.app.basic,com.example.app.full.First one would be a library project, second and third one would use this library project.
Classes (Activities etc.) would extend relevant classes from lib project and add only what’s necessary. “basic” code would add almost nothing, but in real life even if “basic” project is a subset of “full” project from user’s perspecitive, you’d still end up having code that belongs to “basic” but does not belong to “full”.
This way you’d have separate AndroidManifest.xml files for basic and pro versions. And since Google Play store requires apps to have unique package, this would make generating APKs easier.
More about library projects: http://developer.android.com/tools/projects/projects-eclipse.html#SettingUpLibraryProject