in-app-purchase - 是否有必要从 "Google Play Billing with AIDL"迁移到 "Google Play Billing Library"?

标签 in-app-purchase in-app-billing android-billing in-app-subscription android-inapp-purchase

我知道“Google Play Billing with AIDL”已弃用,但我正在使用的应用程序非常复杂,我不想更改应用程序的核心部分。

在游戏控制台上,我收到以下消息:-

“我们检测到您的应用使用的是旧版 Google Play Developer API。从 2019 年 12 月 1 日起,此 API 的版本 1 和 2 将不再可用。请在此日期之前更新到版本 3。”

我检查了“Google Play Billing Library”内部也使用相同的“Google Play Billing with AIDL”,所以我有点困惑,如果问题只能在更新库后才能解决。

在我的代码中,我已经在使用计费 API 的 API 版本 3。

private IInAppBillingService billingService;

Bundle buyIntentBundle = billingService.getBuyIntent(3, packageName, sku, type, developerPayload);
billingService.getSkuDetails(3, application.getPackageName(),
                                    ITEM_TYPE_INAPP, bundle);
billingService.consumePurchase(3, application.getPackageName(), iabOrder.purchaseToken);
billingService.getPurchases(3, application.getPackageName(), ITEM_TYPE_INAPP, null);
billingService.isBillingSupported(3, application.getPackageName(),
                    ITEM_TYPE_INAPP);

任何人都可以帮我找出为什么我收到这条使用第三版 Google Play Developer API 的特殊消息的主要原因。

最佳答案

Google Play Billing Library 是您的 Android 应用中使用的客户端 API。

Google Play Developer API 是用于在 Google Play 上管理购买和应用的服务器 API。

“我们检测到您的应用使用的是旧版 Google Play Developer API。从 2019 年 12 月 1 日起,此 API 的版本 1 和 2 将不再可用。请在此日期之前更新到版本 3。”提示您更新您的 Google Play Developer API,而不是您的 Android 应用中使用的 Google Play Billing Library。

https://github.com/android/play-billing-samples/commit/36459a4d015b40f8c6840f202fb1127c6ec95947是将 Google Play Developer API 更新到 v3 的示例

关于in-app-purchase - 是否有必要从 "Google Play Billing with AIDL"迁移到 "Google Play Billing Library"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57161391/

相关文章:

android - `SkuType.INAPP`中的 'SkuType.SUBS`和 `In app purchase`有什么区别

android - 我们可以更改应用内结算产品 Play 商店的价格吗

android - 应用内结算,无法让 RESULT_DEVELOPER_ERROR 消失

android - 实现广告显示此错误 : Support for pending purchases must be enabled

iphone - 尝试重新购买时不调用 SKPaymentTransactionStateRestored

android - 错误 401 Google-api-php-client 通过服务器 Android inapppurchase 验证

ios - 有没有办法避免在 iOS 中进行任何购买时产生应用内 (30%) 费用?

ios - 我如何知道应用内购买是否可以在我的应用中使用?

Android:如何使用应用内计费更新 Android 应用?

android - 为什么 Android BillingClient v2 慢速信用卡测试永远不会取消?