Flutter in_app_purchase stuck at queryProductDetails() method
I was battling against the same problem and finally found the solution.
This part needs to be removed from the app-level build.gradle
file in order for in_app_purchase
to work properly. Once I removed these two lines, everything worked flawlessly.
def billing_version = "4.0.0"
implementation "com.android.billingclient:billing:$billing_version"
This it terribly misleading, since the in_app_purchase package links to the "Getting started" guide for Google Play, which explicitly says to add these two lines.
Dinesh Parmar
Updated on November 25, 2022Comments
-
Dinesh Parmar over 1 year
#in_app_purchase I'm using in_app_purchase in my flutter app. https://pub.dev/packages/in_app_purchase Firstly I was using RevenueCat services for my IAP services but due to the unavailability of purchase tokens from Revenue Cat. I decided to use flutter official's in_app_purchase. Apparently in this approach when I query for all my products from Google Play. The program is stuck at
InAppPurchase.instance.queryProductDetails();
method and isn't giving any response. Not even an error. I have also initiated the InAppPurchase instance but still, it's getting me the issue. Can anybody please help figure this out?
-
Marat Hakobjanyan about 2 yearsThis solution works properly. Thanks.
-
Ronald Blüthl about 2 yearsYou're most welcome.
-
Marat Hakobjanyan about 2 yearsRonald, how can I find you? I would like to get feedback from you about my implementation of inapp purchases? Thanks.
-
Ronald Blüthl about 2 years@MaratHakobjanyan I'm rbluethl on Twitter - feel free to reach out over there.