use of com.android.billingclient.api.BillingFlowParams in project react-native-iap by dooboolab.
the class RNIapModule method buyItemByType.
@ReactMethod
public void buyItemByType(String type, String sku, Promise promise) {
addPromiseForKey(PROMISE_BUY_ITEM, promise);
BillingFlowParams flowParams = BillingFlowParams.newBuilder().setSku(sku).setType(type).build();
int responseCode = mBillingClient.launchBillingFlow(getCurrentActivity(), flowParams);
Log.d(TAG, "buyItemByType (type: " + type + ", sku: " + sku + ") responseCode: " + responseCode + "(" + getBillingResponseCodeName(responseCode) + ")");
}
Aggregations