How to handle application upgrades from free to paid version while preserving any data

前端 未结 3 429
南旧
南旧 2020-12-18 11:00

Here is the context. I want to have a free version and a premium version of the same application. When people buy the application, I want them to be able to \"upgrade\" with

3条回答
  •  悲哀的现实
    2020-12-18 11:15

    My idea is the following:

    • Paid version's android:versionCode should be free's android:versionCode +1
    • Both should have the same package.

    When paid version is installed, it will replace the free one. Actually it will update it, since it has a higher android:versionCode.

    As both have the same package, they will be placed in the same folder ( /data/data/your.package) so the paid app will be able to access the free app db.

提交回复
热议问题