I'm migrating my code from old AIDL google play billing system to the newer Google Play Billing library v3. I used old code in background threads to check if a purchase was present for example. The new library uses several listeners and methods like newBuilder
, startConnection
and endConnection
are marked as UIThread
. At this point it seems quite hard to create a BillingClient
in a background thread just to call queryPurchase
. The constructor of BillingClient
is actually public, but docs says you cannot call any method until the connection is performed using startConnection
. I didn't find any example to query something in background, any tips?
Asked
Active
Viewed 187 times
1

greywolf82
- 21,813
- 18
- 54
- 108
-
1Did you solve this problem? I'm moving from AIDL to 4.0 and I have issues with my sync server calls in background thread because someone in Google decided to mess old good working things up. – Tertium Jul 08 '21 at 22:30