如何在保留任何数据的同时处理从免费版本到付费版本的应用程序升级 [英] How to handle application upgrades from free to paid version while preserving any data

查看:28
本文介绍了如何在保留任何数据的同时处理从免费版本到付费版本的应用程序升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是上下文.我想要同一应用程序的免费版本和高级版本.当人们购买应用程序时,我希望他们能够升级"而不会丢失数据,即高级版应该安装在免费版之上.我想使用相同的代码库,只需切换一个设置来构建高级版本.Andoid Market 不允许我将免费应用程序转换为付费应用程序,因此不提供琐碎选项.

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" without losing their data, i.e. the premium version should install over the free version. I want to use the same code base and just switch a setting to build the premium version. Andoid Market does not let me convert a free app to a paid app, so the trivial option is not available.

我很好奇是否有人成功地尝试过.Android Market 如何识别应用程序 - 它是否会认为高级版本是不同的应用程序并只是并行安装?

I am curious if someone has tried this successfully. How does Android Market identify an application - will it think that the premium version is a different app and just install it in parallel?

推荐答案

答案是:Android Market 无法解决这个问题,因为 Market 不允许上传两个包名相同的应用.不能欺骗 Android 安装高级版而不是免费版并将其视为升级.

The answer is: this is not solvable with Android Market, because Market does not allow the upload of two apps with the same package name. Android cannot be tricked into installing the premium version over the free version and treat it as an upgrade.

好消息:添加数据库备份/恢复功能(将数据库复制到 SD 卡并返回到应用程序文件夹)只需要几行代码.我的用户必须同时安装这两个版本,从免费版本备份数据库并将其恢复到高级版本.

The good news: adding database backup/restore functionality (copying the database to the SD card and back to the app folder) only required a few lines of code. My users will have to install both versions in parallel, back up the database from the free version and restore it to the premium version.

这篇关于如何在保留任何数据的同时处理从免费版本到付费版本的应用程序升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆