gpt4 book ai didi

Android 电子市场应用内结算 IN_APP_NOTIFY 响应

转载 作者:太空狗 更新时间:2023-10-29 13:39:50 27 4
gpt4 key购买 nike

我正在尝试了解适用于 Android 的应用内结算文档,特别是 IN_APP_NOTIFIY 响应。寻找 at the reference ,内容如下

com.android.vending.billing.IN_APP_NOTIFY

This response indicates that a purchase has changed state, which means a purchase succeeded, was canceled, or was refunded. This response contains one or more notification IDs. Each notification ID corresponds to a specific server-side message, and each messages contains information about one or more transactions. After your application receives an IN_APP_NOTIFY broadcast intent, you send a GET_PURCHASE_INFORMATION request with the notification IDs to retrieve the message details. The sample application assigns this broadcast intent to a constant named ACTION_NOTIFY.

Extras

notification_id—a String representing the notification ID for a given purchase state change. Android Market notifies you when there is a purchase state change and the notification includes a unique notification ID. To get the details of the purchase state change, you send the notification ID with the GET_PURCHASE_INFORMATION request.

当响应只是一个字符串时,如何获取多个通知 ID?如何处理多个通知的情况?

最佳答案

看来google的文档确实是错误的。也许写这段摘录的人对“Google Play 可能会重复发送 IN_APP_NOTIFY Intent 以获取 PURCHASE_STATE_CHANGED 消息,即使您的应用程序已发送 CONFIRM_NOTIFICATIONS 消息”这一事实感到困惑。可以在这里阅读:http://developer.android.com/guide/google/play/billing/billing_overview.html#billing-action-notify

这意味着您应该能够处理多个 IN_APP_NOTIFY Intent ,但一个 IN_APP_NOTIFY Intent 只包含一个通知 ID。另一种可能性是,编写文档的人对以下事实感到困惑:当发出 GET_PURCHASE_INFORMATION 类型的请求时,您可以发送一组通知 ID,如“检索购买或退款的交易信息 (GET_PURCHASE_INFORMATION)”一节中所述在文档中:http://developer.android.com/guide/google/play/billing/billing_integrate.html

关于Android 电子市场应用内结算 IN_APP_NOTIFY 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7070439/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com