Android如何从GooglePlay控制台获取产品列表 [英] Android How to get product list from GooglePlay console

查看:1367
本文介绍了Android如何从GooglePlay控制台获取产品列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发我的产品中的Android应用内结算。我想向您询问如何获取我已经通过Google Play控制台注册的所有产品



这是Google play的示例代码。 / p>

 列表additionalSkuList = new List(); 
additionalSkuList.add(SKU_APPLE);
additionalSkuList.add(SKU_BANANA);
mHelper.queryInventoryAsync(true,additionalSkuList,mQueryFinishedListener);

但是如果我把附加的skuList没有任何内容,它将不会返回任何内容。



我希望通过提前使用产品信息来了解我在Google Play控制台的应用内商品中注册的所有产品,以制作视图。

任何人有同样的问题?任何人都知道解决它的方法?

解决方案

你不能。基本上, mHelper.queryInventoryAsync(true,additionalSkuList,mQueryFinishedListener);
>最终调用 getSkuDetails()方法直接从 InAppBillingService.aidl

  / ** 
*提供SKU列表的详细信息
*给出skusBundle中有效类型的SKU列表,它将返回一个捆绑包
*带有包含productId,价格,标题和说明的JSON字符串列表。
*此API可以最多调用20个SKU。
* @param apiVersion第三方使用的计费API版本
* @param packageName调用应用程序的包名称
* @param skusBundle包含SKU的StringArrayList,其中包含键 ITEM_ID_LIST
* @return Bundle包含以下键值对
*RESPONSE_CODE为int值,RESULT_OK(0)如果成功,其他响应代码在上面列出的
*失败。
*DETAILS_LIST,包含购买信息
*的StringArrayList,类似于:
*'{productId:exampleSku,type:inapp,price :$ 5.00,
*title:示例标题,description:这是一个示例说明}'
* /
Bundle getSkuDetails(int apiVersion,String packageName ,字符串类型,在Bundle中skusBundle);

如果您在 additionalSkuList ,那么你将不会得到任何返回的结果。



总之,您只需知道(并列出)所有SKU,然后把这个列表放到查询中。


I'm developing Android In-app Billing in my product. I want to ask you about how to get all products that I already registered by Google play console.

It's sample code from Google play.

List additionalSkuList = new List();
additionalSkuList.add(SKU_APPLE);
additionalSkuList.add(SKU_BANANA);
mHelper.queryInventoryAsync(true, additionalSkuList, mQueryFinishedListener);

but If I put additionalSkuList is nothing, It will return nothing.

I want to know all products that I registered in In-app Products of Google play console to make Views by using product's information in advance.

Anyone has same problem ? Anyone knows a way to solve it ?

解决方案

You can't. Well, not that I'm aware of.

Basically mHelper.queryInventoryAsync(true, additionalSkuList, mQueryFinishedListener); eventually calls to getSkuDetails() method straight from InAppBillingService.aidl

 /**
 * Provides details of a list of SKUs
 * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle
 * with a list JSON strings containing the productId, price, title and description.
 * This API can be called with a maximum of 20 SKUs.
 * @param apiVersion billing API version that the Third-party is using
 * @param packageName the package name of the calling app
 * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST"
 * @return Bundle containing the following key-value pairs
 *         "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on
 *              failure as listed above.
 *         "DETAILS_LIST" with a StringArrayList containing purchase information
 *              in JSON format similar to:
 *              '{ "productId" : "exampleSku", "type" : "inapp", "price" : "$5.00",
 *                 "title : "Example Title", "description" : "This is an example description" }'
 */
Bundle getSkuDetails(int apiVersion, String packageName, String type, in Bundle skusBundle);

If you specify no list in your additionalSkuList, then you will get nothing as returned result.

In short, you just have to know (and list) all SKUs, then put this list into the query.

这篇关于Android如何从GooglePlay控制台获取产品列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆