According to https://developer.android.com/google/play/billing/integrate the billingClient.querySkuDetails is called with withContext(Dispatchers.IO)
fun querySkuDetails() {
val skuList = ArrayList<String>()
skuList.add("premium_upgrade")
skuList.add("gas")
val params = SkuDetailsParams.newBuilder()
params.setSkusList(skuList).setType(SkuType.INAPP)
val skuDetailsResult = withContext(Dispatchers.IO) {
billingClient.querySkuDetails(params.build())
}
// Process the result.
}
I am curious which benefits it gives as querySkuDetails is already a suspending function. So what do i gain here.
I could write the same code with
val skuDetailsResult = coroutineScope {
billingClient.querySkuDetails(params.build())
}
There is no more context and i don't know how to download the source code of the billing client.