小编Nis*_*han的帖子

是否有必要从“Google Play Billing with AIDL”迁移到“Google Play Billing Library”?

我知道“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);
Run Code Online (Sandbox Code Playgroud)

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

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

6
推荐指数
1
解决办法
2282
查看次数