本文介绍了检查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:

来源: 订阅已取消

希望这可以帮到你

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

10-10 04:19