java - 亚马逊应用内购买

标签 java android amazon-web-services

当我们通过 Amazon inApp API 实现 InApp 时,我们由采购经理调用 initiatePurchaseUpdatesRequests(Offset offset) 函数。作为响应,我们得到 onPurchaseUpdatesResponse(PurchaseUpdatesResponse obj)

我对偏移量感到困惑。如果我们是第一次调用,那么我们可以使用 Ofset.BEGINNING 并在响应中使用 obj.getOffset() 方法。文档说这将返回您应该发送的 Offset

如果返回旧的偏移量,则意味着每次都会发送相同的 Offset.BEGINNING

此外,我首先对 Offset 是什么感到困惑。

有人可以澄清这些要点吗?

最佳答案

根据IAP Reference :

public Offset getOffset()

Returns an Offset that you can pass to PurchasingManager.initiatePurchaseUpdatesRequest(Offset) if isMore() indicates that more results are available.

IAP Quick Start Guide ,它说:

If PurchaseUpdatesResponse.isMore() returns true, make a recursive call to PurchasingManager.initiatePurchaseUpdatesRequest() with the value returned in PurchaseUpdatesResponse.getOffset().

@yasiriqbal776,我认为您可能误读了文档。否则,您能否提供您所引用的文档的 URL?

关于java - 亚马逊应用内购买,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24178568/

相关文章:

java - 如何安全地终止已超时的查询

Java 基础作为模板参数

java - 如何在 Android 中迭代非常大的字符串数组?

amazon-web-services - AWS Cognito 在首次登录时不提示 MFA

java - 目标运行时 WebSphere Application Server 传统 V9.0 未定义

java - 找不到 PreferenceScreen 类

javascript - Android Webview加载不规则问题

android - 添加事件和提醒在 6.0 marshmallow 中不起作用

amazon-web-services - 如何确定 ResourceTag 命名空间 (ec2 :ResourceTag vs aws:ResourceTag vs iam:ResourceTag)

amazon-web-services - 云形成无法创建带有 VPCIdNotSpecified 的安全组