IAP is not working after published in to play store in alpha release
Asked Answered
U

1

6

I am developing the flutter app which has In-app-Purchases feature, I have created the non-consumable product (one time) in the developer console. And I am using the official flutter package to implement IAP in the app - https://pub.dev/packages/in_app_purchase.

  • IAP product is in active state in the play console
  • I uploaded the right version and version code of the APK
  • My app is in published state
  • I have added the license testers under account settings to test IAP.
  • my androidManifest.xml file updated with right user permission for BILLING.

when I test the IAP in local it works well, I am able to test the IAP properly. but after I published the same (generated App bundle) in to play store under Alpha release, it does not works. If I check the logs using the abd logcat, then I just getting the below line related to billing

BillingClient: Client is already in the process of connecting to billing service.

I am not sure, should I specifically do any app signing before generates the app bundle after added the IAP. I am just using the existing key information which I have used for previous releases to do the app signing.

Kindly let me know if anybody can help on this problem and I can share if anyother information is required

Unlive answered 30/12, 2019 at 8:37 Comment(1)
Have you checked playstore app signing turned on or not? if it's on then you need to generate new key for that sign which will be generated by playstore.Sanitarian
U
2

Now the IAP feature is working in my flutter APP (in Alpha, beta, Production), the problem was in the code. when we try to connect to the store we have this code to check the store availability.

final bool available = await InAppPurchaseConnection.instance.isAvailable();

I was just checking one time and if store available I further coded the premium features logic. But this works always in local, but the published alpha/beta versions never works. so I just changed my code like below.

if(!available)
{
    //try to connect again
    await InAppPurchaseConnection.instance.isAvailable();
}

Here I am just trying to connect the store again, If first time fails. so at first we dont get always the response properly, trying multiple times to connect with store helps to work IAP. I put the logic to check the connection 3 times. Hope this helps!

Unlive answered 8/1, 2020 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.