I'm testing in-app purchase using the three reserved product IDs for testing static Google Play Billing responses:
- android.test.purchased
- android.test.canceled
- android.test.item_unavailable
However, setSku and setType seem to be deprecated in the BillingFlowParams.Builder class. Instead, we should be using setSkuDetails(SkuDetails).
How should I change the BillingFlowParams in the example code to use SkuDetails for the test product IDs?
BillingFlowParams flowParams = BillingFlowParams.newBuilder()
.setSku(skuId)
.setType(SkuType.INAPP)
.build();
int responseCode = mBillingClient.launchBillingFlow(flowParams);