Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The billingClient is aways !null #2

Open
A-W-C-J opened this issue Oct 22, 2023 · 0 comments
Open

The billingClient is aways !null #2

A-W-C-J opened this issue Oct 22, 2023 · 0 comments

Comments

@A-W-C-J
Copy link

A-W-C-J commented Oct 22, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant