Clean up the GodotPlugin public API.

This commit is contained in:
Fredia Huya-Kouadio
2020-06-15 09:17:43 -07:00
parent 50c4834548
commit 61aa477e1c
3 changed files with 17 additions and 7 deletions

View File

@ -68,7 +68,7 @@ public class GodotPayment extends GodotPlugin implements PurchasesUpdatedListene
super(godot);
billingClient = BillingClient
.newBuilder(getGodot())
.newBuilder(getActivity())
.enablePendingPurchases()
.setListener(this)
.build();
@ -183,7 +183,7 @@ public class GodotPayment extends GodotPlugin implements PurchasesUpdatedListene
.setSkuDetails(skuDetails)
.build();
BillingResult result = billingClient.launchBillingFlow(getGodot(), purchaseParams);
BillingResult result = billingClient.launchBillingFlow(getActivity(), purchaseParams);
Dictionary returnValue = new Dictionary();
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {