【问题标题】:Buy same in-app product while testing in app billing在应用计费测试时购买相同的应用内产品
【发布时间】:2016-08-11 19:29:34
【问题描述】:

我正在我的一个应用程序中添加应用内计费。 我创建了一个测试帐户并添加了一张信用卡。我买了一次产品,一切都很好。 现在我想再次测试这个相同的流程。我该怎么做?

每当我尝试购买商品时,以下代码中的pendingIntent 始终为空。

Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(),
                KEY_AD_FREE, "inapp", "");
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");

是因为我已经购买了产品,还是有其他问题?

【问题讨论】:

标签: android google-play google-play-services in-app-billing


【解决方案1】:

您只能购买一次非消耗性产品,因为 Google Play 会记住购买。你必须调用 yourIabHelperInstance.consumeAsync(purchase, mConsumeFinishedListener);因此,您向 Google 发送了删除其“通知”的请求。我目前也在尝试这个,但它对我不起作用。如果你能解决你的问题,请回答我;)(所有教程都说它必须与 consumeAsync 一起工作......)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多