谷歌应用程式内购买和试用期 [英] Google Inapp purchasing and trial period

查看:177
本文介绍了谷歌应用程式内购买和试用期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建设,我想上传到应用商店的付费应用的应用程序。但我想将它张贴作为一个设定的时间量审判程序。我看着在app计费版本的所有选项3.我已经发现了一些问题。


  1. 如果我创建了非消耗应用程式内的项目应用程序,然后我将不能够保持它在设定时间的试用版应用程序(请让我知道,如果我的假设是正确的)。


  2. I F我通过订阅基于模型创造它,然后有没有办法可以让订阅永远持续下去,而不是每年的?



解决方案

这里的主要问题是用户卸载/重新安装应用程序,并失去了共享preferences。

解决这个问题的简单方法是使用谷歌的共享preferencesBackupHelper

Android共享preferences备份不工作

您只需保存安装日期为preference。即使应用程序是未安装的,如果他们再次安装时,原稿安装日期将仍然供您查询。

I am building an application which I wish to upload to the app store as a paid app. But i would like to post it as a trial app for a set amount of time. I looked at all the options in the app billing version 3. I have found a few problems.

  1. If I create my app with a non-consumable inapp item then i will not be able to keep it for a set duration as a trial app(Please let me know if my assumption is correct).

  2. I f I create it via a subscription based model then is there a way I can make the subscriptions last forever and not yearly?

解决方案

The main problem here is the user uninstalling / reinstalling the app and losing the shared preferences.

The easy way around this is to use Google's SharedPreferencesBackupHelper

Android SharedPreferences Backup Not Working

You simply save the install date as a preference. Even if the app is un-installed, if they install it again, the orig install date will still be available for you to query.

这篇关于谷歌应用程式内购买和试用期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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