我正在我的产品中开发 Android 应用内结算功能。我想问你关于如何获取我已经通过 Google Play 控制台注册的所有产品。
这是来自 Google play 的示例代码。
List additionalSkuList = new List();
additionalSkuList.add(SKU_APPLE);
additionalSkuList.add(SKU_BANANA);
mHelper.queryInventoryAsync(true, additionalSkuList, mQueryFinishedListener);
但是如果我把 additionalSkuList 什么都没有,它什么也不会返回。
我想知道我在 Google Play 控制台的 In-app Products 中注册的所有产品,以便提前使用产品信息进行浏览。
有人遇到同样的问题吗?任何人都知道解决它的方法吗?
最佳答案
现在可以使用 Google Play Developer API(又名 android-publisher
):
https://developers.google.com/android-publisher/
特别是 Inappproducts: list应用程序接口(interface):
List all the in-app products for an Android app, both subscriptions and managed in-app products.
关于Android 如何从 Google Play 控制台获取产品列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31152276/