检查Android中的应用程序内订阅状态 [英] Check the status of In-App Subscription in Android

查看:430
本文介绍了检查Android中的应用程序内订阅状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应用程序,其中有应用内购买,每月自动续订..在第一次成功付款时,我已经调用了一个网络服务,其中我已经让用户进入高级课程。

I have created an application in which there is in-app purchases which has monthly auto renewal.. on first time successful payment i have called a web-service in which i have made the user to premium class.

现在,如果用户已从谷歌服务器手动取消付款,我怎么知道该用户已取消他/她的订阅。

Now if the user has cancelled the payment manually from the google server, how could i know that user has cancelled his/her subscription.

是否有一些PHP代码查询或从android我必须在后台调用一些东西来检查状态?

Is there is some PHP code query or from android i have to called something in background to check the status??

谢谢你推荐

推荐答案

你可以查看购买的订阅在应用程序内通过

You can check the purchased subscriptions inside the app via

编辑:对于订阅使用subs,对于inapp-purchases使用inapp例如:

For subscriptions use "subs", for inapp-purchases use "inapp" e.g.:

Inapp-Purchases: mService.getPurchases(3,getPackageName(),inapp,null);

Inapp-Purchases: mService.getPurchases(3, getPackageName(), "inapp", null);

订阅: mService.getPurchases(3,getPackageName(),subs,null);

参见<$ href =http://developer.android.com/google/play/billing/billing_integrate.html\"rel =nofollow noreferrer查询已购买物品 > http://developer.android.com/google/play/billing/billing_integrate.html

See also Querying for Purchased Items at http://developer.android.com/google/play/billing/billing_integrate.html

因此,您可以在您的应用中实施任务检查用户是否仍有订阅。如果没有,您可以删除高级状态。此外,此信息可能对您有用:

So you can implement a task in your app where you check if the user still has a subscription. If not, you can remove the premium status. Moreover this information could be useful for you:


当用户取消订阅时,Google Play不会为当前结算周期提供退款。相反,它允许用户访问已取消的订阅,直到当前结算周期结束,此时它终止订阅。例如,如果用户购买了每月订阅并在周期的第15天取消订阅,则Google Play会认为订阅有效,直到第30天结束(或其他日期,具体取决于月份)。

When the user cancels a subscription, Google Play does not offer a refund for the current billing cycle. Instead, it allows the user to have access to the canceled subscription until the end of the current billing cycle, at which time it terminates the subscription. For example, if a user purchases a monthly subscription and cancels it on the 15th day of the cycle, Google Play will consider the subscription valid until the end of the 30th day (or other day, depending on the month).

来源: http://developer.android.com/google/play/billing/billing_subscriptions.html 订阅已取消

希望这可以帮到你

这篇关于检查Android中的应用程序内订阅状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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