Google IAP: skusBundle array associated with key ITEM_ID_LIST cannot contain more than 20 items., jsarraycontain

Source: Internet
Author: User

Google IAP: skusBundle array associated with key ITEM_ID_LIST cannot contain more than 20 items., jsarraycontain

In the past few days, I received the payment from Google and switched the chrysanthemum when I pulled the Google product list. I didn't return it for a long time (querySkuDetails). At first I thought it was caused by incorrect IAP keys, no problem found.

Check logcat again and find this line:

Input Error: skusBundle array associated with key ITEM_ID_LIST cannot contain more than 20 items.

Indeed, there are 23 IAP products and two solutions:

1. https://code.google.com/archive/p/marketbilling/issues/123

The IabHelper patch processes the request in batches. This patch has been generated for a while. I don't know if Google has put this merge in. I want to know more about it.

 

2. in fact, it is not the second solution. IabHelper is modified from the Google layer because I have encapsulated the Google layer before developing the game and added my own Helper layer, after the jar package is compiled, I am too lazy to try it again. Therefore, the second solution is to batch requests from the business layer.

When the business layer sends batch requests in batches, note that the requests cannot be sent twice or more at the same frame. Otherwise, only the last request data will be returned (test-by-test = ).

My practices (briefly described ):

(1) calculate the total number of batches.

(2) start to request the first batch and wait for the first batch to return

(3) add the first batch of returns to the product list. The current batch number is + 1.

(4) If it is less than the total number of batches, request the next batch. If it is equal to the total number of batches, jump out and do the following...

Set a total chrysanthemum conversion time. If the network is stable, the two batches will be pulled in two or three seconds.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.