简体   繁体   English

应用内结算V3 - 购买3个月后过期的对象 - Android

[英]In-App Billing V3 - Purchase an Object that expires after 3 months - Android

I must implement in an Android App the purchase of an item that expires after 3 months. 我必须在Android App中实施购买3个月后过期的商品。

I read on the developer guide that I should use "unmanaged" products, but I also read that in V3 Version of the API this object is handle as a managed product. 我在开发者指南中读到我应该使用“非托管”产品,但我也读到,在V3版本的API中,此对象作为托管产品处理。

The question is the following, after the users buy an unmanaged object how can I manage the expiration? 问题如下,用户购买非托管对象后如何管理到期? For example when the period will expire, the user can purchase another time the same product if he want? 例如,当期限到期时,用户可以再次购买相同的产品吗?

Are you using an online database for your app? 您是否在为应用程序使用在线数据库?

If true, I think that the best way to do it is generating the end date when item is purchased and saving it in an online database. 如果是,我认为最好的方法是在购买商品时生成结束日期并将其保存在在线数据库中。 Then you have to check if end date is not past regularly in your app (for example every time that user start app,...). 然后,您必须检查应用程序中的结束日期是否定期过去(例如,每次用户启动应用程序时,...)。

This works for me, but in my case app connects regularly to a online database to work. 这适用于我,但在我的情况下,应用程序定期连接到在线数据库工作。

Other methods, like save end date in local storage can be easy hacked. 其他方法,如在本地存储中保存结束日期,很容易被黑客入侵。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM