I think to have followed all the steps correctly from the documentation but I can't reach the callback of querySkuDetailsAsync, no errors reported. The app is working correctly with IAB, now I'm only migrating from old library to the new 'com.android.billingclient:billing:2.0.3' but many problems. Another question, in the new library is also necessary the use of License Key from Play Console? I don't find documentation about using that in the new library.
I can correctly and without errors reach this line billingClient.querySkuDetailsAsync(params, (billingResult2, skuDetailsList) ->
Sku ids are correctly
private void setupIab()
{
billingClient = BillingClient.newBuilder(getApplicationContext()).enablePendingPurchases().setListener(this).build();
billingClient.startConnection(new BillingClientStateListener()
{
@Override
public void onBillingSetupFinished(BillingResult billingResult)
{
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK)
{
List<String> skuList = new ArrayList<> ();
skuList.add("test_sku_1");
SkuDetailsParams params = SkuDetailsParams.newBuilder().setSkusList(skuList).setType(BillingClient.SkuType.INAPP).build();
billingClient.querySkuDetailsAsync(params, (billingResult2, skuDetailsList) ->
{
// Process the result.
if (billingResult2.getResponseCode() == BillingClient.BillingResponseCode.OK && skuDetailsList != null)
{
}
});
}
}
@Override
public void onBillingServiceDisconnected()
{
// Try to restart the connection on the next request to
// Google Play by calling the startConnection() method.
}
});
}
Best regards
querySkuDetailsAsync
callback is never called. I don't get any errors either. – Antitank