On with scenario onBillingServiceDisconnected is called?

352 views Asked by At

does the onBillingServiceDisconnected will be call right after the BillingClient.startConnection if something went wrong? or say differently does BillingClient.startConnection, in case of error, will always fire onBillingSetupFinished with billingResult = error or it's will call onBillingServiceDisconnected instead ?

1

There are 1 answers

0
RodXander On

onBillingServiceDisconnected will be called when there's a connection already, but it gets lost. You can test this by clearing Google Play's data while your app is open. You should retry at this point to get the connection back.

onBillingSetupFinished with an error code will be called when you are trying to connect, but it failed. No connection existed beforehand. Depending on the error code you may want to retry here as well. Check the codes here.