Skip to content

Commit

Permalink
Optimizing google play implementation (#18047)
Browse files Browse the repository at this point in the history
* Optimizing google play implementation

* Initializing member variables

* Remove redundant code

---------

Co-authored-by: qiuguohua <[email protected]>
  • Loading branch information
qiuguohua and qiuguohua authored Dec 17, 2024
1 parent d3b121f commit a670a91
Show file tree
Hide file tree
Showing 14 changed files with 279 additions and 325 deletions.
6 changes: 3 additions & 3 deletions @types/jsb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1411,9 +1411,9 @@ declare namespace jsb {
isExternalOfferAvailableAsync: (listener: ExternalOfferAvailabilityListener) => void;

isFeatureSupported: (productType: string) => BillingResult;
showAlternativeBillingOnlyInformationDialog: (listener: AlternativeBillingOnlyInformationDialogListener) => BillingResult;
showExternalOfferInformationDialog: (listener: ExternalOfferInformationDialogListener) => BillingResult;
showInAppMessages: (params: InAppMessageParams, listener: InAppMessageResponseListener) => BillingResult;
showAlternativeBillingOnlyInformationDialog: (listener: AlternativeBillingOnlyInformationDialogListener) => void;
showExternalOfferInformationDialog: (listener: ExternalOfferInformationDialogListener) => void;
showInAppMessages: (params: InAppMessageParams, listener: InAppMessageResponseListener) => void;
}
}

Expand Down
6 changes: 3 additions & 3 deletions editor/engine-features/render-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@
"2d"
]
},
"vendor": {
"vendor-google": {
"default": false,
"label": "i18n:ENGINE.features.vendor.label",
"description": "i18n:ENGINE.features.vendor.description",
"label": "i18n:ENGINE.features.vendor_google.label",
"description": "i18n:ENGINE.features.vendor_google.description",
"enginePlugin": false,
"isNativeModule": true,
"cmakeConfig": "USE_VENDOR",
Expand Down
4 changes: 2 additions & 2 deletions editor/i18n/en/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,8 @@ module.exports = link(mixin({
label: "Tiled Map",
description: "Tiled map support.",
},
vendor: {
label: "Vendor",
vendor_google: {
label: "Vendor Google",
description: "Vendor support.",
},
spine: {
Expand Down
6 changes: 3 additions & 3 deletions editor/i18n/zh/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,9 +1021,9 @@ module.exports = link(mixin({
label: "Tiled 地图",
description: "Tiled 地图支持。",
},
vendor: {
label: "Vendor",
description: "Vendor 支持.",
vendor_google: {
label: "Vendor Google",
description: "Vendor Google 支持.",
},
spine: {
label: "Spine 动画",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,8 @@ public void queryProductDetailsAsync(String[] productIds, String[] productTypes,
Log.e(TAG, e.getMessage());
}
}
public void launchBillingFlow(BillingFlowParams params) {
try {
_billingClient.launchBillingFlow(GlobalObject.getActivity(), params);
} catch (RuntimeException e) {
Log.e(TAG, e.getMessage());
}
public BillingResult launchBillingFlow(BillingFlowParams params) {
return _billingClient.launchBillingFlow(GlobalObject.getActivity(), params);
}

public void queryPurchasesAsync(String type, @NonNull PurchasesResponseListener listener) {
Expand Down
Loading

0 comments on commit a670a91

Please sign in to comment.