Giter VIP home page Giter VIP logo

funsol-billing-helper's People

Contributors

hannanshahid avatar hannanshahidfunsoltech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

funsol-billing-helper's Issues

The library does not work with apps that do not use subscriptions

Subscriptions are still processed even when an empty subscription list is provided to the library, resulting in the following error:

Fatal Exception: java.lang.IllegalArgumentException
Product list cannot be empty.
com.android.billingclient.api.QueryProductDetailsParams$Builder.setProductList (com.android.billingclient:billing@@7.0.0:2)
com.funsol.iap.billing.FunSolBillingHelper.fetchAvailableAllSubsProducts (FunSolBillingHelper.kt:200)
com.funsol.iap.billing.FunSolBillingHelper.access$fetchAvailableAllSubsProducts (FunSolBillingHelper.kt:19)
com.funsol.iap.billing.FunSolBillingHelper$startConnection$1$onBillingSetupFinished$1$1.invokeSuspend (FunSolBillingHelper.kt:140)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)
kotlinx.coroutines.internal.LimitedDispatcher$Worker.run (LimitedDispatcher.kt:115)
kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:100)
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:584)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:793)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:697)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:684)

The billingClient is aways !null

Thank you for providing such an excellent project as FunSolBillingHelper. However, I have a few questions. Running the original project for the first time continuously results in billingClient being not null. This prevents startConnection() from being called in subsequent runs, making it impossible to call fetchAvailableAllSubsProducts(subKeys), resulting in a PRODUCT_NOT_EXIST error every time a purchase is attempted. To address this, I made a slight modification:

  1. I added billingClient = null in FunSolBillingHelper(this).release(), and called FunSolBillingHelper(this).release() in onDestroy(). However, this seems to be ineffective.
  2. I called FunSolBillingHelper(this).release() directly before FunSolBillingHelper(this).setSubKeys..... This worked, and I was able to successfully initiate payments every time.

I’m not sure if I have misunderstood your code, so I hope you can review it. If you think it’s appropriate, I am willing to submit a Pull Request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.