anjlab / android-inapp-billing-v3

A lightweight implementation of Android In-app Billing Version 3
Other
2.19k stars 535 forks source link

v3 consumePurchaseAsync() causing error 110 the first time, but works fine the second time. #505

Closed goman64 closed 2 years ago

goman64 commented 2 years ago

Calling consumePurchaseAsync() triggers onBillingError with errorCode = 110 and the following message:

java.lang.RuntimeException: Can't create handler inside thread Thread[PlayBillingLibrary-4,5,main] that has not called Looper.prepare()

Calling it again works fine.

goman64 commented 2 years ago

Issue was with another library that was calling a thread in the background instead of the UI.