anjlab / android-inapp-billing-v3

A lightweight implementation of Android In-app Billing Version 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

billingProcessor.getSubscriptionsListingDetailsAsync always got Empty products list

ShawnLin013 opened this issue · comments

commented
  • which version of library you use: v2.0.2

After migrating to v2.0.2, billingProcessor.getSubscriptionsListingDetailsAsync always got Empty products list.
The issue is caused by the line 878 getSkuDetailsAsync in BillingProcessor.java.
It could be fixed by replacing if (productIdList != null && productIdList.size() > 0) with if (productIdList == null || productIdList.size() <= 0) in. getSkuDetailsAsync().

Related code snippet of getSkuDetailsAsync()

private void getSkuDetailsAsync(final ArrayList<String> productIdList, String purchaseType,
									final ISkuDetailsResponseListener listener)
	{
		if (billingService == null || !billingService.isReady())
		{
			reportSkuDetailsErrorCaller("Failed to call getSkuDetails. Service may not be connected", listener);
			return;
		}
		if (productIdList != null && productIdList.size() > 0)
		{
			reportSkuDetailsErrorCaller("Empty products list", listener);
			return;
		}

ah, shoot...let me fix that

use 2.0.3