I have an application that I\'m going to publish to the Android market. I\'m planning on releasing a paid-for version and a free version with restricted feature set.
you can also use ProductFlavor in your gradle
productFlavor{
demo{
.....your code.....
}
pro{
.... your code for pro....
}
}
You do have to use different package names as explained, but you don't have to duplicate much code, even if you use separate projects. What I did when I decided to release two versions is to make my original a library project, and create separate projects that referenced it. Reference (Assumes Eclipse) The only thing you have to copy is the manifest. Anything else with changes you can simply extend your original class and overwrite what you need to.
Yes, you need to make to use two different package names for the free and paid version. Fortunately, its really easy, right click your App Project in Eclipse -> Android Tools -> Rename Application Package.
Yes if you want to have 2 different versions they must have different package names. I have free and pay versions and it is a pain to manage this and both code bases.
Another option though is to just have a "key" app that you can sell that will unlock features in the free version.