开发者

how to Manage Free version?

I have just released my first app and would like to have a free version to it as well. I was wondering how should I manage my free 开发者_StackOverflow社区version branch (in svn) so that it's easy to merge changes from full version? is it possible to just change package name in Manifest file? or do the package names have to be different in code? If so how could I Merge Changes easily?

Thanks, Jason


The Android Library Project is your friend here.


I use this in all my apps :

public static final boolean LITE_VERSION = true;

then use it to disable some features.

It's important to know that the java compiler will ignore any piece of code in a if (!LITE_VERSION) block if LITE_VERSION is set to true, so it can't be reverse engineered (you can test it with the "javap -c" command).


Do you really want to maintain a different branch to create a free version?
I would use the same code base and disable some features in the free version, either by #ifdef or configuration parameters.


I use Ant for builds. I previously documented how I build two versions of the same app. The last section where I discuss how to deal with differing manifests is probably of most interest to you.


I try to use the same codebase and package name and offer a premium key, which could be an extra App (apk) or just a serial number. This approach has the positive sideeffect that users who want to upgrade can use their old data and settings. The key just enables a flag like mention before which enables features dynamically

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜