Splitting android application in to two 'branches', free and paid

孤人 提交于 2019-12-21 16:58:19

问题


I've developed an android-application that I'dd like to put up on the marketplace. However, I want to split it into two separate applications, one free (with ads), and one paid (logically without ads). How would I go about doing that? I'm not wondering about adding ads (I've alreaddy managed that), but how to take one existing android-application (eclipse-project) and split it into two without having to create a new project and just copy-paste every file one by one (or in batch for that matter). Is that possible?

Btw, I use GIT for SCM, so I've made two separate branches, one master and one free, but I need to set some cind of config-value that makes shure that the market separates them as two different applications.

Also, when a user 'upgrades', is it possible to copy the db from the free app to the paid one?


回答1:


You could use the Maven Android Plugin to build multiple versions of the same application. You could then specify a different AndroidManifest for each version (in order to specify a different Application Package Name for each version).

Your free and paid version of your app would be different profiles in Maven.




回答2:


For your second question, don't you use the device's database? If so, you can access it at '/data/data/free_app/databases/' and copy it over to /data/data/paid_app/databases/ .

Or even use the same package name for the apps, and make both use the same database. You'll have to make the free one uninstall itself when the otehr is bought so the data doesn't get weird.

See here in case you use an app database.




回答3:


you could do in app payments to make the upgrade to paid version, it'd be neat because you'd have everything on just one project



来源:https://stackoverflow.com/questions/2762052/splitting-android-application-in-to-two-branches-free-and-paid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!