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

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

问题描述

下面是上下文。 我想有一个免费版本和相同的应用程序的premium版本。当人们购买的应用程序,我希望他们能升级,而不会失去他们的数据,即premium版本应该安装在免费版本。 我想用同样的code碱基,只是切换到打造premium版本的设置。 Andoid市场并不让我转换一个免费的应用程序,以一个付费应用程序,所以琐碎选项不可用。

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的标识应用程序 - 它会认为premium版本是一个不同的应用程序,只需将其安装在平行

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市场,因为市场不允许两个应用程序的上传与同一包的名称。 Android无法被欺骗安装premium版比免费版本,把它作为升级。

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卡上,并返回到应用程序文件夹中)时才需要code几行。我的用户必须安装并联两个版本,免费版本备份的数据库,并将其恢复为premium版本。

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.

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

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