wdtheprovider / in-app-purchases-subscription

Working on Android In-App Purchases for Google Play billing library with the latest version 6.0.0+
https://github.com/wdtheprovider/in-app-purchases-subscription
138 stars 44 forks source link

Product always show size 0 #4

Closed micekeykai closed 2 years ago

micekeykai commented 2 years ago

In showProducts() prodDetailsList always show size 0 。

  1. What parts do I need to modify so that the number of products will appear?
  2. PublicKey Is it not necessary?

Thanks

wdtheprovider commented 2 years ago

Hi @micekeykai did you configure your testing account and device using the same Gmail account?

Did you use your app created product IDs on your console account?

PublicKey is not required because I'm using the official documentation.

micekeykai commented 2 years ago

Hi @micekeykai did you configure your testing account and device using the same Gmail account? Yes。 Did you use your app created product IDs on your console account? Yes。 PublicKey is not required because I'm using the official documentation. Thanks。

PS. I use other lib ( com.github.moisoni97:google-inapp-billing:1.0.8 ) show me sku size 2.
I think, all settings should be correct。 But this this lib can not detect sku is purchased。

wdtheprovider commented 2 years ago

@micekeykai I can help you debug the issue, if you are using my codes. I don't the lib you used.

micekeykai commented 2 years ago

ImmutableList productList = ImmutableList.of( //Product 1 QueryProductDetailsParams.Product.newBuilder() .setProductId("one_week") .setProductType(BillingClient.ProductType.SUBS) .build() ,

//Product 2 QueryProductDetailsParams.Product.newBuilder() .setProductId("one_month") .setProductType(BillingClient.ProductType.SUBS) .build(),

//Product 3 QueryProductDetailsParams.Product.newBuilder() .setProductId("one_year") .setProductType(BillingClient.ProductType.SUBS) .build() );

If add more the one product then productDetailsList size alway 0。 I do not know why. At the moment I only have one subscription, which temporarily solves my problem. thank you for your help.