Create Free/Paid versions of Application from same code

后端 未结 7 1391
Happy的楠姐
Happy的楠姐 2020-11-30 18:36

So I\'m coming down to release-time for my application. We plan on releasing two versions, a free ad-based play-to-unlock version, and a paid fully unlocked version. I have

7条回答
  •  时光说笑
    2020-11-30 18:52

    One approach I'm experimenting with is using fully-qualified names for activities, and just changing the package attribute. It avoids any real refactoring (1 file copy, 1 text sub).

    This almost works, but the generated R class isn't picked up, as the package for this is pulled out of AndroidManifest.xml, so ends up in the new package.

    I think it should be fairly straight forward to build AndroidManifest.xml via an Ant rule (in -pre-build) that inserts the distribution package name, and then (in -pre-compile) the generated resources into the default (Java) package.

    Hope this helps,

    Phil Lello

提交回复
热议问题