com.beanbag.huaweiads 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Documentation.md +9 -0
- package/Documentation.md.meta +7 -0
- package/Editor/Editor/Extensions/ActionExtensions.cs +32 -0
- package/Editor/Editor/Extensions/ActionExtensions.cs.meta +11 -0
- package/Editor/Editor/Extensions/CollectionExtensions.cs +36 -0
- package/Editor/Editor/Extensions/CollectionExtensions.cs.meta +11 -0
- package/Editor/Editor/Extensions/StringExtensions.cs +119 -0
- package/Editor/Editor/Extensions/StringExtensions.cs.meta +11 -0
- package/Editor/Editor/Extensions/WindowExtensions.cs +59 -0
- package/Editor/Editor/Extensions/WindowExtensions.cs.meta +11 -0
- package/Editor/Editor/Extensions.meta +8 -0
- package/Editor/Editor/General/UI/Button/Button.cs +143 -0
- package/Editor/Editor/General/UI/Button/Button.cs.meta +11 -0
- package/Editor/Editor/General/UI/Button/Clickable.cs +30 -0
- package/Editor/Editor/General/UI/Button/Clickable.cs.meta +11 -0
- package/Editor/Editor/General/UI/Button.meta +8 -0
- package/Editor/Editor/General/UI/Collections/IReadOnlyList.cs +10 -0
- package/Editor/Editor/General/UI/Collections/IReadOnlyList.cs.meta +11 -0
- package/Editor/Editor/General/UI/Collections.meta +8 -0
- package/Editor/Editor/General/UI/ConditionalDrawer.cs +25 -0
- package/Editor/Editor/General/UI/ConditionalDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/CustomEditorDrawer.cs +12 -0
- package/Editor/Editor/General/UI/CustomEditorDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Depth.cs +27 -0
- package/Editor/Editor/General/UI/Depth.cs.meta +11 -0
- package/Editor/Editor/General/UI/DisabledDrawer.cs +53 -0
- package/Editor/Editor/General/UI/DisabledDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Dropdown/EnumDropdown.cs +35 -0
- package/Editor/Editor/General/UI/Dropdown/EnumDropdown.cs.meta +11 -0
- package/Editor/Editor/General/UI/Dropdown/EnumFlagsDropdown.cs +24 -0
- package/Editor/Editor/General/UI/Dropdown/EnumFlagsDropdown.cs.meta +11 -0
- package/Editor/Editor/General/UI/Dropdown/IDropdown.cs +9 -0
- package/Editor/Editor/General/UI/Dropdown/IDropdown.cs.meta +11 -0
- package/Editor/Editor/General/UI/Dropdown/StringDropdown.cs +46 -0
- package/Editor/Editor/General/UI/Dropdown/StringDropdown.cs.meta +11 -0
- package/Editor/Editor/General/UI/Dropdown.meta +8 -0
- package/Editor/Editor/General/UI/Focusable.cs +53 -0
- package/Editor/Editor/General/UI/Focusable.cs.meta +11 -0
- package/Editor/Editor/General/UI/Foldout.cs +61 -0
- package/Editor/Editor/General/UI/Foldout.cs.meta +11 -0
- package/Editor/Editor/General/UI/HelpBox/HelpBox.cs +42 -0
- package/Editor/Editor/General/UI/HelpBox/HelpBox.cs.meta +11 -0
- package/Editor/Editor/General/UI/HelpBox/RichHelpBox.cs +35 -0
- package/Editor/Editor/General/UI/HelpBox/RichHelpBox.cs.meta +11 -0
- package/Editor/Editor/General/UI/HelpBox.meta +8 -0
- package/Editor/Editor/General/UI/HorizontalLine.cs +13 -0
- package/Editor/Editor/General/UI/HorizontalLine.cs.meta +11 -0
- package/Editor/Editor/General/UI/IDrawer.cs +7 -0
- package/Editor/Editor/General/UI/IDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Image/Image.cs +49 -0
- package/Editor/Editor/General/UI/Image/Image.cs.meta +11 -0
- package/Editor/Editor/General/UI/Image.meta +8 -0
- package/Editor/Editor/General/UI/InlineGroup.cs +41 -0
- package/Editor/Editor/General/UI/InlineGroup.cs.meta +11 -0
- package/Editor/Editor/General/UI/Label/DelegatedLabel.cs +31 -0
- package/Editor/Editor/General/UI/Label/DelegatedLabel.cs.meta +11 -0
- package/Editor/Editor/General/UI/Label/Label.cs +133 -0
- package/Editor/Editor/General/UI/Label/Label.cs.meta +11 -0
- package/Editor/Editor/General/UI/Label.meta +8 -0
- package/Editor/Editor/General/UI/List/AlteratingListDrawer.cs +93 -0
- package/Editor/Editor/General/UI/List/AlteratingListDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/List/ListDrawer.cs +77 -0
- package/Editor/Editor/General/UI/List/ListDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/List.meta +8 -0
- package/Editor/Editor/General/UI/LongProcess.cs +24 -0
- package/Editor/Editor/General/UI/LongProcess.cs.meta +11 -0
- package/Editor/Editor/General/UI/Menu/EditableMenu.cs +46 -0
- package/Editor/Editor/General/UI/Menu/EditableMenu.cs.meta +11 -0
- package/Editor/Editor/General/UI/Menu/Menu.cs +55 -0
- package/Editor/Editor/General/UI/Menu/Menu.cs.meta +11 -0
- package/Editor/Editor/General/UI/Menu.meta +8 -0
- package/Editor/Editor/General/UI/PersistentFoldout.cs +72 -0
- package/Editor/Editor/General/UI/PersistentFoldout.cs.meta +11 -0
- package/Editor/Editor/General/UI/ScrollView/ScrollView.cs +16 -0
- package/Editor/Editor/General/UI/ScrollView/ScrollView.cs.meta +11 -0
- package/Editor/Editor/General/UI/ScrollView.meta +8 -0
- package/Editor/Editor/General/UI/Sequence/EmptySequenceDrawer.cs +33 -0
- package/Editor/Editor/General/UI/Sequence/EmptySequenceDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Sequence/HorizontalSequenceDrawer.cs +18 -0
- package/Editor/Editor/General/UI/Sequence/HorizontalSequenceDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Sequence/SequenceDrawer.cs +74 -0
- package/Editor/Editor/General/UI/Sequence/SequenceDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Sequence/VerticalSequenceDrawer.cs +28 -0
- package/Editor/Editor/General/UI/Sequence/VerticalSequenceDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Sequence.meta +8 -0
- package/Editor/Editor/General/UI/Space.cs +19 -0
- package/Editor/Editor/General/UI/Space.cs.meta +11 -0
- package/Editor/Editor/General/UI/Spacer.cs +13 -0
- package/Editor/Editor/General/UI/Spacer.cs.meta +11 -0
- package/Editor/Editor/General/UI/TabBar/TabBar.cs +42 -0
- package/Editor/Editor/General/UI/TabBar/TabBar.cs.meta +11 -0
- package/Editor/Editor/General/UI/TabBar/TabView.cs +13 -0
- package/Editor/Editor/General/UI/TabBar/TabView.cs.meta +11 -0
- package/Editor/Editor/General/UI/TabBar.meta +8 -0
- package/Editor/Editor/General/UI/TextArea/TextArea.cs +74 -0
- package/Editor/Editor/General/UI/TextArea/TextArea.cs.meta +11 -0
- package/Editor/Editor/General/UI/TextArea.meta +8 -0
- package/Editor/Editor/General/UI/TextField/ReturnChecker.cs +40 -0
- package/Editor/Editor/General/UI/TextField/ReturnChecker.cs.meta +11 -0
- package/Editor/Editor/General/UI/TextField/TextField.cs +169 -0
- package/Editor/Editor/General/UI/TextField/TextField.cs.meta +11 -0
- package/Editor/Editor/General/UI/TextField/TextFieldWithAccept.cs +65 -0
- package/Editor/Editor/General/UI/TextField/TextFieldWithAccept.cs.meta +11 -0
- package/Editor/Editor/General/UI/TextField.meta +8 -0
- package/Editor/Editor/General/UI/TimedDrawer.cs +35 -0
- package/Editor/Editor/General/UI/TimedDrawer.cs.meta +11 -0
- package/Editor/Editor/General/UI/Toggle/Toggle.cs +67 -0
- package/Editor/Editor/General/UI/Toggle/Toggle.cs.meta +11 -0
- package/Editor/Editor/General/UI/Toggle/ToggledTextFieldWithButton.cs +41 -0
- package/Editor/Editor/General/UI/Toggle/ToggledTextFieldWithButton.cs.meta +11 -0
- package/Editor/Editor/General/UI/Toggle.meta +8 -0
- package/Editor/Editor/General/UI/Window/DisplayDialog.cs +55 -0
- package/Editor/Editor/General/UI/Window/DisplayDialog.cs.meta +11 -0
- package/Editor/Editor/General/UI/Window/HMSEditorWindow.cs +60 -0
- package/Editor/Editor/General/UI/Window/HMSEditorWindow.cs.meta +11 -0
- package/Editor/Editor/General/UI/Window/ModalDialog.cs +93 -0
- package/Editor/Editor/General/UI/Window/ModalDialog.cs.meta +11 -0
- package/Editor/Editor/General/UI/Window/ModalWindow.cs +88 -0
- package/Editor/Editor/General/UI/Window/ModalWindow.cs.meta +11 -0
- package/Editor/Editor/General/UI/Window.meta +8 -0
- package/Editor/Editor/General/UI.meta +8 -0
- package/Editor/Editor/General.meta +8 -0
- package/Editor/Editor/HuaweiAdsFileCopier.cs +62 -0
- package/Editor/Editor/HuaweiAdsFileCopier.cs.meta +11 -0
- package/Editor/Editor/HuaweiMobileServices.Editor.asmdef +17 -0
- package/Editor/Editor/HuaweiMobileServices.Editor.asmdef.meta +7 -0
- package/Editor/Editor/Utils/HMSEditorUtils.cs +490 -0
- package/Editor/Editor/Utils/HMSEditorUtils.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSExcelHelper.cs +50 -0
- package/Editor/Editor/Utils/HMSExcelHelper.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSGradleFixer.cs +178 -0
- package/Editor/Editor/Utils/HMSGradleFixer.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSGradleWorker.cs +316 -0
- package/Editor/Editor/Utils/HMSGradleWorker.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSPackageChecker.cs +26 -0
- package/Editor/Editor/Utils/HMSPackageChecker.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSPluginUpdater.cs +208 -0
- package/Editor/Editor/Utils/HMSPluginUpdater.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSPluginUpdaterInit.cs +20 -0
- package/Editor/Editor/Utils/HMSPluginUpdaterInit.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSWebRequestHelper.cs +388 -0
- package/Editor/Editor/Utils/HMSWebRequestHelper.cs.meta +11 -0
- package/Editor/Editor/Utils/HMSWebUtils.cs +113 -0
- package/Editor/Editor/Utils/HMSWebUtils.cs.meta +11 -0
- package/Editor/Editor/Utils.meta +8 -0
- package/Editor/Editor/View/AdsTab/HMSAdsSettingsDrawer.cs +427 -0
- package/Editor/Editor/View/AdsTab/HMSAdsSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/AdsTab/HMSAdsTabFactory.cs +14 -0
- package/Editor/Editor/View/AdsTab/HMSAdsTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/AdsTab.meta +8 -0
- package/Editor/Editor/View/CloudDBTab/HMSCloudDBSettingsDrawer.cs +208 -0
- package/Editor/Editor/View/CloudDBTab/HMSCloudDBSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/CloudDBTab/HMSCloudDBTabFactory.cs +13 -0
- package/Editor/Editor/View/CloudDBTab/HMSCloudDBTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/CloudDBTab.meta +8 -0
- package/Editor/Editor/View/ConnectAPI/HMSConnectAPITabFactory.cs +30 -0
- package/Editor/Editor/View/ConnectAPI/HMSConnectAPITabFactory.cs.meta +11 -0
- package/Editor/Editor/View/ConnectAPI/HMSConnectAPIWindow.cs +22 -0
- package/Editor/Editor/View/ConnectAPI/HMSConnectAPIWindow.cs.meta +11 -0
- package/Editor/Editor/View/ConnectAPI/TokenObtainerEditor.cs +43 -0
- package/Editor/Editor/View/ConnectAPI/TokenObtainerEditor.cs.meta +11 -0
- package/Editor/Editor/View/ConnectAPI.meta +8 -0
- package/Editor/Editor/View/GameServiceTab/AchievementsManipulator.cs +92 -0
- package/Editor/Editor/View/GameServiceTab/AchievementsManipulator.cs.meta +11 -0
- package/Editor/Editor/View/GameServiceTab/HMSAchievementsAdderDrawer.cs +35 -0
- package/Editor/Editor/View/GameServiceTab/HMSAchievementsAdderDrawer.cs.meta +11 -0
- package/Editor/Editor/View/GameServiceTab/HMSGameServiceSettingsDrawer.cs +138 -0
- package/Editor/Editor/View/GameServiceTab/HMSGameServiceSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/GameServiceTab/HMSGameServiceTabFactory.cs +13 -0
- package/Editor/Editor/View/GameServiceTab/HMSGameServiceTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/GameServiceTab/HMSLeaderboardAdderDrawer.cs +34 -0
- package/Editor/Editor/View/GameServiceTab/HMSLeaderboardAdderDrawer.cs.meta +11 -0
- package/Editor/Editor/View/GameServiceTab/LeaderboardManipulator.cs +92 -0
- package/Editor/Editor/View/GameServiceTab/LeaderboardManipulator.cs.meta +11 -0
- package/Editor/Editor/View/GameServiceTab.meta +8 -0
- package/Editor/Editor/View/InAppPurchaseTab/HMSIAPProductAdderDrawer.cs +36 -0
- package/Editor/Editor/View/InAppPurchaseTab/HMSIAPProductAdderDrawer.cs.meta +11 -0
- package/Editor/Editor/View/InAppPurchaseTab/HMSIAPSettingsDrawer.cs +195 -0
- package/Editor/Editor/View/InAppPurchaseTab/HMSIAPSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/InAppPurchaseTab/HMSIAPTabFactory.cs +14 -0
- package/Editor/Editor/View/InAppPurchaseTab/HMSIAPTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/InAppPurchaseTab/IAPProductManipulator.cs +111 -0
- package/Editor/Editor/View/InAppPurchaseTab/IAPProductManipulator.cs.meta +11 -0
- package/Editor/Editor/View/InAppPurchaseTab.meta +8 -0
- package/Editor/Editor/View/KeyToolTab/HMSKeyToolWindow.cs +240 -0
- package/Editor/Editor/View/KeyToolTab/HMSKeyToolWindow.cs.meta +11 -0
- package/Editor/Editor/View/KeyToolTab.meta +8 -0
- package/Editor/Editor/View/KitSettingsTab/APMToggleEditor.cs +59 -0
- package/Editor/Editor/View/KitSettingsTab/APMToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/AccountToggleEditor.cs +78 -0
- package/Editor/Editor/View/KitSettingsTab/AccountToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/AdsToggleEditor.cs +76 -0
- package/Editor/Editor/View/KitSettingsTab/AdsToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/AnalyticsToggleEditor.cs +92 -0
- package/Editor/Editor/View/KitSettingsTab/AnalyticsToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/AppLinkingToggleEditor.cs +67 -0
- package/Editor/Editor/View/KitSettingsTab/AppLinkingToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/AppMessagingToggleEditor.cs +57 -0
- package/Editor/Editor/View/KitSettingsTab/AppMessagingToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/AuthToggleEditor.cs +71 -0
- package/Editor/Editor/View/KitSettingsTab/AuthToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/CloudDBToggleEditor.cs +80 -0
- package/Editor/Editor/View/KitSettingsTab/CloudDBToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/CloudStorageToggleEditor.cs +64 -0
- package/Editor/Editor/View/KitSettingsTab/CloudStorageToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/CrashToggleEditor.cs +63 -0
- package/Editor/Editor/View/KitSettingsTab/CrashToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/DriveKitToggleEditor.cs +74 -0
- package/Editor/Editor/View/KitSettingsTab/DriveKitToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/GameServiceToggleEditor.cs +81 -0
- package/Editor/Editor/View/KitSettingsTab/GameServiceToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/HelpboxAGConnectFile.cs +24 -0
- package/Editor/Editor/View/KitSettingsTab/HelpboxAGConnectFile.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/IAPToggleEditor.cs +76 -0
- package/Editor/Editor/View/KitSettingsTab/IAPToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/LocationToogleEditor.cs +66 -0
- package/Editor/Editor/View/KitSettingsTab/LocationToogleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/MLKitToggleEditor.cs +87 -0
- package/Editor/Editor/View/KitSettingsTab/MLKitToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/Modeling3dKitToggleEditor.cs +75 -0
- package/Editor/Editor/View/KitSettingsTab/Modeling3dKitToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/NearbyServiceToggleEditor.cs +56 -0
- package/Editor/Editor/View/KitSettingsTab/NearbyServiceToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/PluginToggleEditor.cs +58 -0
- package/Editor/Editor/View/KitSettingsTab/PluginToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/PushToggleEditor.cs +71 -0
- package/Editor/Editor/View/KitSettingsTab/PushToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/RemoteConfigToggleEditor.cs +80 -0
- package/Editor/Editor/View/KitSettingsTab/RemoteConfigToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/ScanKitToggleEditor.cs +59 -0
- package/Editor/Editor/View/KitSettingsTab/ScanKitToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab/ToggleEditor.cs +12 -0
- package/Editor/Editor/View/KitSettingsTab/ToggleEditor.cs.meta +11 -0
- package/Editor/Editor/View/KitSettingsTab.meta +8 -0
- package/Editor/Editor/View/LibrariesTab/HMSLibrariesDrawer.cs +65 -0
- package/Editor/Editor/View/LibrariesTab/HMSLibrariesDrawer.cs.meta +11 -0
- package/Editor/Editor/View/LibrariesTab.meta +8 -0
- package/Editor/Editor/View/MLKitTab/HMSMLKitSettingsDrawer.cs +145 -0
- package/Editor/Editor/View/MLKitTab/HMSMLKitSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/MLKitTab/HMSMLKitTabFactory.cs +15 -0
- package/Editor/Editor/View/MLKitTab/HMSMLKitTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/MLKitTab.meta +8 -0
- package/Editor/Editor/View/MainWindow/HMSMainKitsTabFactory.cs +136 -0
- package/Editor/Editor/View/MainWindow/HMSMainKitsTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/MainWindow/HMSMainWindow.cs +60 -0
- package/Editor/Editor/View/MainWindow/HMSMainWindow.cs.meta +11 -0
- package/Editor/Editor/View/MainWindow.meta +8 -0
- package/Editor/Editor/View/ModelingTab/ModelingSettingsDrawer.cs +43 -0
- package/Editor/Editor/View/ModelingTab/ModelingSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/ModelingTab/ModelingTabFactory.cs +12 -0
- package/Editor/Editor/View/ModelingTab/ModelingTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/ModelingTab.meta +8 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/AllIAPProductsEditor.cs +192 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/AllIAPProductsEditor.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/HMSAllIAPProductsWindow.cs +34 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/HMSAllIAPProductsWindow.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/IAPQueryListEditor.cs +41 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/IAPQueryListEditor.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/UpdateIAPProductWindow/HMSUpdateIAPProductWindow.cs +24 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/UpdateIAPProductWindow/HMSUpdateIAPProductWindow.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/UpdateIAPProductWindow/UpdateIAPProductEditor.cs +269 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/UpdateIAPProductWindow/UpdateIAPProductEditor.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow/UpdateIAPProductWindow.meta +8 -0
- package/Editor/Editor/View/PMSWindow/AllIAPProductsWindow.meta +8 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow/CreateProductEditor.cs +452 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow/CreateProductEditor.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow/HMSCreateAProductWindow.cs +34 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow/HMSCreateAProductWindow.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow/LanguagesFoldoutEditor.cs +96 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow/LanguagesFoldoutEditor.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/CreateAProductWindow.meta +8 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow/CreateProductsEditor.cs +322 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow/CreateProductsEditor.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow/HMSCSVReader.cs +53 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow/HMSCSVReader.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow/HMSCreateProductsWindow.cs +34 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow/HMSCreateProductsWindow.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow/CreateProductsWindow.meta +8 -0
- package/Editor/Editor/View/PMSWindow/HMSPMSAPITabFactory.cs +40 -0
- package/Editor/Editor/View/PMSWindow/HMSPMSAPITabFactory.cs.meta +11 -0
- package/Editor/Editor/View/PMSWindow.meta +8 -0
- package/Editor/Editor/View/PublishingAPI/HMSPublishingAPITabFactory.cs +15 -0
- package/Editor/Editor/View/PublishingAPI/HMSPublishingAPITabFactory.cs.meta +11 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation/HelpBoxEnablingAppSigning.cs +22 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation/HelpBoxEnablingAppSigning.cs.meta +11 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation/QueryingAppInfoEditor.cs +546 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation/QueryingAppInfoEditor.cs.meta +11 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation/QueryingAppInfoWindow.cs +32 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation/QueryingAppInfoWindow.cs.meta +11 -0
- package/Editor/Editor/View/PublishingAPI/QueryingAppInformation.meta +8 -0
- package/Editor/Editor/View/PublishingAPI.meta +8 -0
- package/Editor/Editor/View/RemoteConfigTab/DefaultValueManipulator.cs +115 -0
- package/Editor/Editor/View/RemoteConfigTab/DefaultValueManipulator.cs.meta +11 -0
- package/Editor/Editor/View/RemoteConfigTab/HMSRemoteConfigAdderDrawer.cs +33 -0
- package/Editor/Editor/View/RemoteConfigTab/HMSRemoteConfigAdderDrawer.cs.meta +11 -0
- package/Editor/Editor/View/RemoteConfigTab/HMSRemoteConfigSettingsDrawer.cs +103 -0
- package/Editor/Editor/View/RemoteConfigTab/HMSRemoteConfigSettingsDrawer.cs.meta +11 -0
- package/Editor/Editor/View/RemoteConfigTab/HMSRemoteConfigTabFactory.cs +14 -0
- package/Editor/Editor/View/RemoteConfigTab/HMSRemoteConfigTabFactory.cs.meta +11 -0
- package/Editor/Editor/View/RemoteConfigTab.meta +8 -0
- package/Editor/Editor/View/Utils/CompilationWindow.cs +46 -0
- package/Editor/Editor/View/Utils/CompilationWindow.cs.meta +11 -0
- package/Editor/Editor/View/Utils/ICollectionManipulator.cs +9 -0
- package/Editor/Editor/View/Utils/ICollectionManipulator.cs.meta +11 -0
- package/Editor/Editor/View/Utils/WindowEditRedirect.cs +18 -0
- package/Editor/Editor/View/Utils/WindowEditRedirect.cs.meta +11 -0
- package/Editor/Editor/View/Utils.meta +8 -0
- package/Editor/Editor/View.meta +8 -0
- package/Editor/Editor.meta +8 -0
- package/Editor.meta +8 -0
- package/LICENSE.md +9 -0
- package/LICENSE.md.meta +7 -0
- package/ReadMe.md +2 -0
- package/ReadMe.md.meta +7 -0
- package/Runtime/Demos/APM/APMDemo.unity +2375 -0
- package/Runtime/Demos/APM/APMDemo.unity.meta +7 -0
- package/Runtime/Demos/APM/APMDemoManager.cs +105 -0
- package/Runtime/Demos/APM/APMDemoManager.cs.meta +11 -0
- package/Runtime/Demos/APM/APMDemoUIView.cs +76 -0
- package/Runtime/Demos/APM/APMDemoUIView.cs.meta +11 -0
- package/Runtime/Demos/APM.meta +8 -0
- package/Runtime/Demos/Account/AccountDemo.unity +1255 -0
- package/Runtime/Demos/Account/AccountDemo.unity.meta +7 -0
- package/Runtime/Demos/Account/AccountDemoManager.cs +79 -0
- package/Runtime/Demos/Account/AccountDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Account/AccountUIView.cs +72 -0
- package/Runtime/Demos/Account/AccountUIView.cs.meta +11 -0
- package/Runtime/Demos/Account.meta +8 -0
- package/Runtime/Demos/Ads/AdsDemo.unity +2332 -0
- package/Runtime/Demos/Ads/AdsDemo.unity.meta +7 -0
- package/Runtime/Demos/Ads/AdsDemoManager.cs +257 -0
- package/Runtime/Demos/Ads/AdsDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Ads/AdsUIView.cs +87 -0
- package/Runtime/Demos/Ads/AdsUIView.cs.meta +11 -0
- package/Runtime/Demos/Ads/InstallReferrer/Demo.unity +344 -0
- package/Runtime/Demos/Ads/InstallReferrer/Demo.unity.meta +7 -0
- package/Runtime/Demos/Ads/InstallReferrer/InstallReferrerDemo.cs +55 -0
- package/Runtime/Demos/Ads/InstallReferrer/InstallReferrerDemo.cs.meta +11 -0
- package/Runtime/Demos/Ads/InstallReferrer.meta +8 -0
- package/Runtime/Demos/Ads.meta +8 -0
- package/Runtime/Demos/Analytics/AnalyticsDemo.unity +1918 -0
- package/Runtime/Demos/Analytics/AnalyticsDemo.unity.meta +11 -0
- package/Runtime/Demos/Analytics/AnalyticsDemoManager.cs +46 -0
- package/Runtime/Demos/Analytics/AnalyticsDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Analytics/AnalyticsUIView.cs +49 -0
- package/Runtime/Demos/Analytics/AnalyticsUIView.cs.meta +11 -0
- package/Runtime/Demos/Analytics.meta +8 -0
- package/Runtime/Demos/AppLinking/AppLinkingDemo.cs +144 -0
- package/Runtime/Demos/AppLinking/AppLinkingDemo.cs.meta +11 -0
- package/Runtime/Demos/AppLinking/AppLinkingDemo.unity +1709 -0
- package/Runtime/Demos/AppLinking/AppLinkingDemo.unity.meta +7 -0
- package/Runtime/Demos/AppLinking/AppLinkingUIView.cs +108 -0
- package/Runtime/Demos/AppLinking/AppLinkingUIView.cs.meta +11 -0
- package/Runtime/Demos/AppLinking.meta +8 -0
- package/Runtime/Demos/AppMessaging/AppMessaging.unity +541 -0
- package/Runtime/Demos/AppMessaging/AppMessaging.unity.meta +7 -0
- package/Runtime/Demos/AppMessaging/AppMessagingDemoManager.cs +28 -0
- package/Runtime/Demos/AppMessaging/AppMessagingDemoManager.cs.meta +11 -0
- package/Runtime/Demos/AppMessaging.meta +8 -0
- package/Runtime/Demos/AuthService/AuthServiceDemo.cs +204 -0
- package/Runtime/Demos/AuthService/AuthServiceDemo.cs.meta +11 -0
- package/Runtime/Demos/AuthService/AuthServiceDemo.unity +5006 -0
- package/Runtime/Demos/AuthService/AuthServiceDemo.unity.meta +7 -0
- package/Runtime/Demos/AuthService.meta +8 -0
- package/Runtime/Demos/CloudDB/CloudDBDemo.cs +348 -0
- package/Runtime/Demos/CloudDB/CloudDBDemo.cs.meta +11 -0
- package/Runtime/Demos/CloudDB/CloudDBDemo.unity +3420 -0
- package/Runtime/Demos/CloudDB/CloudDBDemo.unity.meta +7 -0
- package/Runtime/Demos/CloudDB/CloudDBDemoUIView.cs +180 -0
- package/Runtime/Demos/CloudDB/CloudDBDemoUIView.cs.meta +11 -0
- package/Runtime/Demos/CloudDB.meta +8 -0
- package/Runtime/Demos/CloudStorage/CloudStorageDemo.cs +201 -0
- package/Runtime/Demos/CloudStorage/CloudStorageDemo.cs.meta +11 -0
- package/Runtime/Demos/CloudStorage/CloudStorageDemo.unity +2074 -0
- package/Runtime/Demos/CloudStorage/CloudStorageDemo.unity.meta +7 -0
- package/Runtime/Demos/CloudStorage.meta +8 -0
- package/Runtime/Demos/CrashKit/CrashDemo.unity +1455 -0
- package/Runtime/Demos/CrashKit/CrashDemo.unity.meta +7 -0
- package/Runtime/Demos/CrashKit/CrashDemoManager.cs +50 -0
- package/Runtime/Demos/CrashKit/CrashDemoManager.cs.meta +11 -0
- package/Runtime/Demos/CrashKit/CrashDemoView.cs +64 -0
- package/Runtime/Demos/CrashKit/CrashDemoView.cs.meta +11 -0
- package/Runtime/Demos/CrashKit.meta +8 -0
- package/Runtime/Demos/DriveKit/DriveDemoManager.cs +135 -0
- package/Runtime/Demos/DriveKit/DriveDemoManager.cs.meta +11 -0
- package/Runtime/Demos/DriveKit/DriveDemoView.cs +90 -0
- package/Runtime/Demos/DriveKit/DriveDemoView.cs.meta +11 -0
- package/Runtime/Demos/DriveKit/DriveKitDemo.unity +1791 -0
- package/Runtime/Demos/DriveKit/DriveKitDemo.unity.meta +7 -0
- package/Runtime/Demos/DriveKit.meta +8 -0
- package/Runtime/Demos/Game/GameAddictionPreventionDemo/GameAddictionPreventionDemo.unity +813 -0
- package/Runtime/Demos/Game/GameAddictionPreventionDemo/GameAddictionPreventionDemo.unity.meta +7 -0
- package/Runtime/Demos/Game/GameAddictionPreventionDemo/GameAddictionPreventionDemoManager.cs +127 -0
- package/Runtime/Demos/Game/GameAddictionPreventionDemo/GameAddictionPreventionDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Game/GameAddictionPreventionDemo.meta +8 -0
- package/Runtime/Demos/Game/GameDemo.unity +3107 -0
- package/Runtime/Demos/Game/GameDemo.unity.meta +7 -0
- package/Runtime/Demos/Game/GameDemoManager.cs +347 -0
- package/Runtime/Demos/Game/GameDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Game/GameDemoUIView.cs +92 -0
- package/Runtime/Demos/Game/GameDemoUIView.cs.meta +11 -0
- package/Runtime/Demos/Game.meta +8 -0
- package/Runtime/Demos/IAP/IAPDemoUIView.cs +114 -0
- package/Runtime/Demos/IAP/IAPDemoUIView.cs.meta +11 -0
- package/Runtime/Demos/IAP/IapDemo.unity +4418 -0
- package/Runtime/Demos/IAP/IapDemo.unity.meta +7 -0
- package/Runtime/Demos/IAP/IapDemoManager.cs +157 -0
- package/Runtime/Demos/IAP/IapDemoManager.cs.meta +11 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/MainMenuManager.cs +200 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/MainMenuManager.cs.meta +11 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/Scene0_MainMenu.unity +2109 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/Scene0_MainMenu.unity.meta +7 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/Scene1_Store.unity +6210 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/Scene1_Store.unity.meta +7 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/StoreManager.cs +145 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store/StoreManager.cs.meta +11 -0
- package/Runtime/Demos/IAP/Second Demo-Menu_Store.meta +8 -0
- package/Runtime/Demos/IAP/UnityDemo/UnityIAPDemoUIView.cs +96 -0
- package/Runtime/Demos/IAP/UnityDemo/UnityIAPDemoUIView.cs.meta +11 -0
- package/Runtime/Demos/IAP/UnityDemo/UnityIapDemo.unity +3930 -0
- package/Runtime/Demos/IAP/UnityDemo/UnityIapDemo.unity.meta +7 -0
- package/Runtime/Demos/IAP/UnityDemo/UnityIapDemoManager.cs +151 -0
- package/Runtime/Demos/IAP/UnityDemo/UnityIapDemoManager.cs.meta +11 -0
- package/Runtime/Demos/IAP/UnityDemo.meta +8 -0
- package/Runtime/Demos/IAP.meta +8 -0
- package/Runtime/Demos/InAppComment/InAppCommentDemo.cs +71 -0
- package/Runtime/Demos/InAppComment/InAppCommentDemo.cs.meta +11 -0
- package/Runtime/Demos/InAppComment/InAppCommentDemo.unity +759 -0
- package/Runtime/Demos/InAppComment/InAppCommentDemo.unity.meta +7 -0
- package/Runtime/Demos/InAppComment.meta +8 -0
- package/Runtime/Demos/Location/ActivityIdentificationDemo.cs +209 -0
- package/Runtime/Demos/Location/ActivityIdentificationDemo.cs.meta +11 -0
- package/Runtime/Demos/Location/FusedLocationDemo.cs +154 -0
- package/Runtime/Demos/Location/FusedLocationDemo.cs.meta +11 -0
- package/Runtime/Demos/Location/GeocodingDemo.cs +94 -0
- package/Runtime/Demos/Location/GeocodingDemo.cs.meta +11 -0
- package/Runtime/Demos/Location/GeofenceDemo.cs +180 -0
- package/Runtime/Demos/Location/GeofenceDemo.cs.meta +11 -0
- package/Runtime/Demos/Location/LocationDemo.unity +5912 -0
- package/Runtime/Demos/Location/LocationDemo.unity.meta +7 -0
- package/Runtime/Demos/Location/LocationDemoManager.cs +49 -0
- package/Runtime/Demos/Location/LocationDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Location.meta +8 -0
- package/Runtime/Demos/ML/LanguageDetection/LanguageDetectionDemoManager.cs +199 -0
- package/Runtime/Demos/ML/LanguageDetection/LanguageDetectionDemoManager.cs.meta +11 -0
- package/Runtime/Demos/ML/LanguageDetection/LanguageDetectionManager.unity +2097 -0
- package/Runtime/Demos/ML/LanguageDetection/LanguageDetectionManager.unity.meta +7 -0
- package/Runtime/Demos/ML/LanguageDetection.meta +8 -0
- package/Runtime/Demos/ML/MLKitDemo.unity +20214 -0
- package/Runtime/Demos/ML/MLKitDemo.unity.meta +7 -0
- package/Runtime/Demos/ML/MlKitDemoManager.cs +89 -0
- package/Runtime/Demos/ML/MlKitDemoManager.cs.meta +11 -0
- package/Runtime/Demos/ML/TextRecognition/TextRecognition.unity +3948 -0
- package/Runtime/Demos/ML/TextRecognition/TextRecognition.unity.meta +7 -0
- package/Runtime/Demos/ML/TextRecognition/TextRecognitionDemoManager.cs +200 -0
- package/Runtime/Demos/ML/TextRecognition/TextRecognitionDemoManager.cs.meta +11 -0
- package/Runtime/Demos/ML/TextRecognition.meta +8 -0
- package/Runtime/Demos/ML/TextToSpeechDemo/TextToSpeechDemo.unity +7398 -0
- package/Runtime/Demos/ML/TextToSpeechDemo/TextToSpeechDemo.unity.meta +7 -0
- package/Runtime/Demos/ML/TextToSpeechDemo/TextToSpeechDemoManager.cs +209 -0
- package/Runtime/Demos/ML/TextToSpeechDemo/TextToSpeechDemoManager.cs.meta +11 -0
- package/Runtime/Demos/ML/TextToSpeechDemo.meta +8 -0
- package/Runtime/Demos/ML/Translate/TranslateDemo.unity +5231 -0
- package/Runtime/Demos/ML/Translate/TranslateDemo.unity.meta +7 -0
- package/Runtime/Demos/ML/Translate/TranslateDemoManager.cs +275 -0
- package/Runtime/Demos/ML/Translate/TranslateDemoManager.cs.meta +11 -0
- package/Runtime/Demos/ML/Translate.meta +8 -0
- package/Runtime/Demos/ML.meta +8 -0
- package/Runtime/Demos/Modeling3D/Modeling3dDemo.unity +4130 -0
- package/Runtime/Demos/Modeling3D/Modeling3dDemo.unity.meta +7 -0
- package/Runtime/Demos/Modeling3D/Modeling3dDemoManager.cs +382 -0
- package/Runtime/Demos/Modeling3D/Modeling3dDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Modeling3D/Modeling3dMeterialDemo.unity +1788 -0
- package/Runtime/Demos/Modeling3D/Modeling3dMeterialDemo.unity.meta +7 -0
- package/Runtime/Demos/Modeling3D/Modeling3dMeterialDemoManager.cs +157 -0
- package/Runtime/Demos/Modeling3D/Modeling3dMeterialDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Modeling3D/ProgressBar.cs +36 -0
- package/Runtime/Demos/Modeling3D/ProgressBar.cs.meta +11 -0
- package/Runtime/Demos/Modeling3D/TaskListDisplay.cs +101 -0
- package/Runtime/Demos/Modeling3D/TaskListDisplay.cs.meta +11 -0
- package/Runtime/Demos/Modeling3D.meta +8 -0
- package/Runtime/Demos/NearbyService/Nearby.unity +1563 -0
- package/Runtime/Demos/NearbyService/Nearby.unity.meta +7 -0
- package/Runtime/Demos/NearbyService/NearbyDemoManager.cs +192 -0
- package/Runtime/Demos/NearbyService/NearbyDemoManager.cs.meta +11 -0
- package/Runtime/Demos/NearbyService/NearbyDemoUIView.cs +73 -0
- package/Runtime/Demos/NearbyService/NearbyDemoUIView.cs.meta +11 -0
- package/Runtime/Demos/NearbyService.meta +8 -0
- package/Runtime/Demos/Push/PushDemo.unity +720 -0
- package/Runtime/Demos/Push/PushDemo.unity.meta +7 -0
- package/Runtime/Demos/Push/PushDemoManager.cs +123 -0
- package/Runtime/Demos/Push/PushDemoManager.cs.meta +11 -0
- package/Runtime/Demos/Push.meta +8 -0
- package/Runtime/Demos/RemoteConfig/RemoteConfigDemo.cs +120 -0
- package/Runtime/Demos/RemoteConfig/RemoteConfigDemo.cs.meta +11 -0
- package/Runtime/Demos/RemoteConfig/RemoteConfigDemo.unity +2259 -0
- package/Runtime/Demos/RemoteConfig/RemoteConfigDemo.unity.meta +7 -0
- package/Runtime/Demos/RemoteConfig/RemoteConfigUIView.cs +109 -0
- package/Runtime/Demos/RemoteConfig/RemoteConfigUIView.cs.meta +11 -0
- package/Runtime/Demos/RemoteConfig.meta +8 -0
- package/Runtime/Demos/Scan/ScanKitDemo.cs +69 -0
- package/Runtime/Demos/Scan/ScanKitDemo.cs.meta +11 -0
- package/Runtime/Demos/Scan/ScanKitDemo.unity +803 -0
- package/Runtime/Demos/Scan/ScanKitDemo.unity.meta +7 -0
- package/Runtime/Demos/Scan/ScanKitUIView.cs +38 -0
- package/Runtime/Demos/Scan/ScanKitUIView.cs.meta +11 -0
- package/Runtime/Demos/Scan.meta +8 -0
- package/Runtime/Demos.meta +8 -0
- package/Runtime/Dlls/EPPlus.dll +0 -0
- package/Runtime/Dlls/EPPlus.dll.meta +69 -0
- package/Runtime/Dlls/HuaweiMobileServices.dll +0 -0
- package/Runtime/Dlls/HuaweiMobileServices.dll.meta +38 -0
- package/Runtime/Dlls/HuaweiMobileServices.pdb +0 -0
- package/Runtime/Dlls/HuaweiMobileServices.pdb.meta +7 -0
- package/Runtime/Dlls/link.xml +5 -0
- package/Runtime/Dlls/link.xml.meta +7 -0
- package/Runtime/Dlls.meta +8 -0
- package/Runtime/HuaweiMobileServices.Core.asmdef +16 -0
- package/Runtime/HuaweiMobileServices.Core.asmdef.meta +7 -0
- package/Runtime/Plugins/Android/BookInfo.java +100 -0
- package/Runtime/Plugins/Android/BookInfo.java.meta +32 -0
- package/Runtime/Plugins/Android/HMSUnityPushKit.plugin/AndroidManifest.xml +13 -0
- package/Runtime/Plugins/Android/HMSUnityPushKit.plugin/build.gradle +31 -0
- package/Runtime/Plugins/Android/HMSUnityPushKit.plugin/project.properties +2 -0
- package/Runtime/Plugins/Android/HMSUnityPushKit.plugin.meta +80 -0
- package/Runtime/Plugins/Android/ObjectTypeInfoHelper.java +33 -0
- package/Runtime/Plugins/Android/ObjectTypeInfoHelper.java.meta +32 -0
- package/Runtime/Plugins/Android/app-debug.aar +0 -0
- package/Runtime/Plugins/Android/app-debug.aar.meta +32 -0
- package/Runtime/Plugins/Android/hmsLauncherTemplate.gradle +32 -0
- package/Runtime/Plugins/Android/hmsLauncherTemplate.gradle.meta +7 -0
- package/Runtime/Plugins/Android/hmsMainTemplate.gradle +13 -0
- package/Runtime/Plugins/Android/hmsMainTemplate.gradle.meta +7 -0
- package/Runtime/Plugins/Android.meta +8 -0
- package/Runtime/Plugins.meta +8 -0
- package/Runtime/Prefabs/HuaweiIDButton.prefab +355 -0
- package/Runtime/Prefabs/HuaweiIDButton.prefab.meta +7 -0
- package/Runtime/Prefabs/HuaweiIDCircleButton.prefab +274 -0
- package/Runtime/Prefabs/HuaweiIDCircleButton.prefab.meta +7 -0
- package/Runtime/Prefabs/Modeling3DTaskListItem.prefab +1881 -0
- package/Runtime/Prefabs/Modeling3DTaskListItem.prefab.meta +7 -0
- package/Runtime/Prefabs/SplashAdPreview.prefab +591 -0
- package/Runtime/Prefabs/SplashAdPreview.prefab.meta +7 -0
- package/Runtime/Prefabs/native_large_image.prefab +1172 -0
- package/Runtime/Prefabs/native_large_image.prefab.meta +7 -0
- package/Runtime/Prefabs.meta +8 -0
- package/Runtime/Resources/Huawei/CircleCorner.png +0 -0
- package/Runtime/Resources/Huawei/CircleCorner.png.meta +135 -0
- package/Runtime/Resources/Huawei/Huawei-White.png +0 -0
- package/Runtime/Resources/Huawei/Huawei-White.png.meta +135 -0
- package/Runtime/Resources/Huawei/RoundedCorner.png +0 -0
- package/Runtime/Resources/Huawei/RoundedCorner.png.meta +135 -0
- package/Runtime/Resources/Huawei.meta +8 -0
- package/Runtime/Resources/close.png +0 -0
- package/Runtime/Resources/close.png.meta +116 -0
- package/Runtime/Resources/coins100.png +0 -0
- package/Runtime/Resources/coins100.png.meta +121 -0
- package/Runtime/Resources/coins1000.png +0 -0
- package/Runtime/Resources/coins1000.png.meta +121 -0
- package/Runtime/Resources/info.png +0 -0
- package/Runtime/Resources/info.png.meta +116 -0
- package/Runtime/Resources/no_ads.png +0 -0
- package/Runtime/Resources/no_ads.png.meta +135 -0
- package/Runtime/Resources/premium.png +0 -0
- package/Runtime/Resources/premium.png.meta +135 -0
- package/Runtime/Resources/xml/remoteConfig.xml +5 -0
- package/Runtime/Resources/xml/remoteConfig.xml.meta +7 -0
- package/Runtime/Resources/xml.meta +8 -0
- package/Runtime/Resources.meta +8 -0
- package/Runtime/Scripts/APM/HMSAPMManager.cs +31 -0
- package/Runtime/Scripts/APM/HMSAPMManager.cs.meta +11 -0
- package/Runtime/Scripts/APM.meta +8 -0
- package/Runtime/Scripts/Account/HMSAccountKitManager.cs +194 -0
- package/Runtime/Scripts/Account/HMSAccountKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Account.meta +8 -0
- package/Runtime/Scripts/Ads/HMSAdsKitManager.cs +977 -0
- package/Runtime/Scripts/Ads/HMSAdsKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Ads/LargeImageNative.cs +166 -0
- package/Runtime/Scripts/Ads/LargeImageNative.cs.meta +11 -0
- package/Runtime/Scripts/Ads.meta +8 -0
- package/Runtime/Scripts/Analytics/HMSAnalyticsKitManager.cs +98 -0
- package/Runtime/Scripts/Analytics/HMSAnalyticsKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Analytics.meta +8 -0
- package/Runtime/Scripts/AppMessaging/HMSAppMessagingManager.cs +60 -0
- package/Runtime/Scripts/AppMessaging/HMSAppMessagingManager.cs.meta +11 -0
- package/Runtime/Scripts/AppMessaging.meta +8 -0
- package/Runtime/Scripts/AuthService/HMSAuthServiceManager.cs +142 -0
- package/Runtime/Scripts/AuthService/HMSAuthServiceManager.cs.meta +11 -0
- package/Runtime/Scripts/AuthService.meta +8 -0
- package/Runtime/Scripts/CloudDB/BookInfo.cs +58 -0
- package/Runtime/Scripts/CloudDB/BookInfo.cs.meta +11 -0
- package/Runtime/Scripts/CloudDB/HMSCloudDBManager.cs +343 -0
- package/Runtime/Scripts/CloudDB/HMSCloudDBManager.cs.meta +11 -0
- package/Runtime/Scripts/CloudDB.meta +8 -0
- package/Runtime/Scripts/CloudStorage/HMSCloudStorageManager.cs +349 -0
- package/Runtime/Scripts/CloudStorage/HMSCloudStorageManager.cs.meta +11 -0
- package/Runtime/Scripts/CloudStorage.meta +8 -0
- package/Runtime/Scripts/Crash/HMSCrashManager.cs +61 -0
- package/Runtime/Scripts/Crash/HMSCrashManager.cs.meta +11 -0
- package/Runtime/Scripts/Crash.meta +8 -0
- package/Runtime/Scripts/Drive/CredentialManager.cs +55 -0
- package/Runtime/Scripts/Drive/CredentialManager.cs.meta +11 -0
- package/Runtime/Scripts/Drive/HMSDriveKitManager.cs +248 -0
- package/Runtime/Scripts/Drive/HMSDriveKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Drive.meta +8 -0
- package/Runtime/Scripts/Game/HMSAchievementsEntry.cs +14 -0
- package/Runtime/Scripts/Game/HMSAchievementsEntry.cs.meta +11 -0
- package/Runtime/Scripts/Game/HMSAchievementsManager.cs +147 -0
- package/Runtime/Scripts/Game/HMSAchievementsManager.cs.meta +11 -0
- package/Runtime/Scripts/Game/HMSGameServiceManager.cs +314 -0
- package/Runtime/Scripts/Game/HMSGameServiceManager.cs.meta +11 -0
- package/Runtime/Scripts/Game/HMSLeaderboardEntry.cs +14 -0
- package/Runtime/Scripts/Game/HMSLeaderboardEntry.cs.meta +11 -0
- package/Runtime/Scripts/Game/HMSLeaderboardManager.cs +272 -0
- package/Runtime/Scripts/Game/HMSLeaderboardManager.cs.meta +11 -0
- package/Runtime/Scripts/Game/HMSSaveGameManager.cs +236 -0
- package/Runtime/Scripts/Game/HMSSaveGameManager.cs.meta +11 -0
- package/Runtime/Scripts/Game.meta +8 -0
- package/Runtime/Scripts/IAP/HMSIAPManager.cs +715 -0
- package/Runtime/Scripts/IAP/HMSIAPManager.cs.meta +11 -0
- package/Runtime/Scripts/IAP/HMSIAPProductType.cs +21 -0
- package/Runtime/Scripts/IAP/HMSIAPProductType.cs.meta +11 -0
- package/Runtime/Scripts/IAP/UnityPurchase/HuaweiPurchasingModule.cs +28 -0
- package/Runtime/Scripts/IAP/UnityPurchase/HuaweiPurchasingModule.cs.meta +11 -0
- package/Runtime/Scripts/IAP/UnityPurchase/HuaweiStore.cs +305 -0
- package/Runtime/Scripts/IAP/UnityPurchase/HuaweiStore.cs.meta +11 -0
- package/Runtime/Scripts/IAP/UnityPurchase.meta +8 -0
- package/Runtime/Scripts/IAP.meta +8 -0
- package/Runtime/Scripts/Location/GeofenceReceiver.cs +29 -0
- package/Runtime/Scripts/Location/GeofenceReceiver.cs.meta +11 -0
- package/Runtime/Scripts/Location/HMSLocationManager.cs +96 -0
- package/Runtime/Scripts/Location/HMSLocationManager.cs.meta +11 -0
- package/Runtime/Scripts/Location/LocationReceiver.cs +40 -0
- package/Runtime/Scripts/Location/LocationReceiver.cs.meta +11 -0
- package/Runtime/Scripts/Location.meta +8 -0
- package/Runtime/Scripts/ML/LangDetector/HMSMLLanguageDetectionManager.cs +180 -0
- package/Runtime/Scripts/ML/LangDetector/HMSMLLanguageDetectionManager.cs.meta +11 -0
- package/Runtime/Scripts/ML/LangDetector.meta +8 -0
- package/Runtime/Scripts/ML/MLDownloadListenerManager.cs +17 -0
- package/Runtime/Scripts/ML/MLDownloadListenerManager.cs.meta +11 -0
- package/Runtime/Scripts/ML/TextRecognition/HMSMLTextRecognitionKitManager.cs +163 -0
- package/Runtime/Scripts/ML/TextRecognition/HMSMLTextRecognitionKitManager.cs.meta +11 -0
- package/Runtime/Scripts/ML/TextRecognition.meta +8 -0
- package/Runtime/Scripts/ML/TextToSpeech/HMSMLTextToSpeechKitManager.cs +276 -0
- package/Runtime/Scripts/ML/TextToSpeech/HMSMLTextToSpeechKitManager.cs.meta +11 -0
- package/Runtime/Scripts/ML/TextToSpeech/MLTextToSpeechListenerManager.cs +94 -0
- package/Runtime/Scripts/ML/TextToSpeech/MLTextToSpeechListenerManager.cs.meta +11 -0
- package/Runtime/Scripts/ML/TextToSpeech.meta +8 -0
- package/Runtime/Scripts/ML/Translate/HMSMLTranslateKitManager.cs +203 -0
- package/Runtime/Scripts/ML/Translate/HMSMLTranslateKitManager.cs.meta +11 -0
- package/Runtime/Scripts/ML/Translate.meta +8 -0
- package/Runtime/Scripts/ML.meta +8 -0
- package/Runtime/Scripts/Modeling3D/HMSModeling3dKitManager.cs +557 -0
- package/Runtime/Scripts/Modeling3D/HMSModeling3dKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Modeling3D/Modeling3dDTO.cs +38 -0
- package/Runtime/Scripts/Modeling3D/Modeling3dDTO.cs.meta +11 -0
- package/Runtime/Scripts/Modeling3D/Modeling3dListenerManager.cs +172 -0
- package/Runtime/Scripts/Modeling3D/Modeling3dListenerManager.cs.meta +11 -0
- package/Runtime/Scripts/Modeling3D.meta +8 -0
- package/Runtime/Scripts/NearbyService/HMSNearbyServiceManager.cs +80 -0
- package/Runtime/Scripts/NearbyService/HMSNearbyServiceManager.cs.meta +11 -0
- package/Runtime/Scripts/NearbyService.meta +8 -0
- package/Runtime/Scripts/Push/HMSPushKitManager.cs +134 -0
- package/Runtime/Scripts/Push/HMSPushKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Push.meta +8 -0
- package/Runtime/Scripts/RemoteConfig/HMSRemoteConfigManager.cs +157 -0
- package/Runtime/Scripts/RemoteConfig/HMSRemoteConfigManager.cs.meta +11 -0
- package/Runtime/Scripts/RemoteConfig.meta +8 -0
- package/Runtime/Scripts/Scan/HMSScanKitManager.cs +60 -0
- package/Runtime/Scripts/Scan/HMSScanKitManager.cs.meta +11 -0
- package/Runtime/Scripts/Scan.meta +8 -0
- package/Runtime/Scripts/Settings/HMSAchievementsSettings.cs +37 -0
- package/Runtime/Scripts/Settings/HMSAchievementsSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSAdsKitSettings.cs +56 -0
- package/Runtime/Scripts/Settings/HMSAdsKitSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSConnectAPISettings.cs +44 -0
- package/Runtime/Scripts/Settings/HMSConnectAPISettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSGameServiceSettings.cs +40 -0
- package/Runtime/Scripts/Settings/HMSGameServiceSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSIAPKitSettings.cs +37 -0
- package/Runtime/Scripts/Settings/HMSIAPKitSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSIAPProductListSettings.cs +74 -0
- package/Runtime/Scripts/Settings/HMSIAPProductListSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSLeaderboardSettings.cs +37 -0
- package/Runtime/Scripts/Settings/HMSLeaderboardSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSMLKitSettings.cs +42 -0
- package/Runtime/Scripts/Settings/HMSMLKitSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSMainEditorSettings.cs +38 -0
- package/Runtime/Scripts/Settings/HMSMainEditorSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSModelingKitSettings.cs +38 -0
- package/Runtime/Scripts/Settings/HMSModelingKitSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSPluginSettings.cs +37 -0
- package/Runtime/Scripts/Settings/HMSPluginSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSRemoteConfigSettings.cs +40 -0
- package/Runtime/Scripts/Settings/HMSRemoteConfigSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/HMSRemoteDefaultValueSettings.cs +53 -0
- package/Runtime/Scripts/Settings/HMSRemoteDefaultValueSettings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/Settings.cs +75 -0
- package/Runtime/Scripts/Settings/Settings.cs.meta +11 -0
- package/Runtime/Scripts/Settings/SettingsScriptableObject.cs +14 -0
- package/Runtime/Scripts/Settings/SettingsScriptableObject.cs.meta +11 -0
- package/Runtime/Scripts/Settings.meta +8 -0
- package/Runtime/Scripts/Utils/HMSExceptionHandler.cs +120 -0
- package/Runtime/Scripts/Utils/HMSExceptionHandler.cs.meta +11 -0
- package/Runtime/Scripts/Utils/HMSManagerStart.cs +36 -0
- package/Runtime/Scripts/Utils/HMSManagerStart.cs.meta +11 -0
- package/Runtime/Scripts/Utils/HMSSafeArea.cs +63 -0
- package/Runtime/Scripts/Utils/HMSSafeArea.cs.meta +11 -0
- package/Runtime/Scripts/Utils/HMSSingleton.cs +56 -0
- package/Runtime/Scripts/Utils/HMSSingleton.cs.meta +11 -0
- package/Runtime/Scripts/Utils/HMSSplashAdPreview.cs +37 -0
- package/Runtime/Scripts/Utils/HMSSplashAdPreview.cs.meta +11 -0
- package/Runtime/Scripts/Utils/HuaweiConstants.cs +204 -0
- package/Runtime/Scripts/Utils/HuaweiConstants.cs.meta +11 -0
- package/Runtime/Scripts/Utils/JsonHelper.cs +23 -0
- package/Runtime/Scripts/Utils/JsonHelper.cs.meta +11 -0
- package/Runtime/Scripts/Utils/PlayerPrefsJsonDatabase.cs +130 -0
- package/Runtime/Scripts/Utils/PlayerPrefsJsonDatabase.cs.meta +11 -0
- package/Runtime/Scripts/Utils/ScriptableHelper.cs +58 -0
- package/Runtime/Scripts/Utils/ScriptableHelper.cs.meta +11 -0
- package/Runtime/Scripts/Utils/SerializableDictionary.cs +129 -0
- package/Runtime/Scripts/Utils/SerializableDictionary.cs.meta +11 -0
- package/Runtime/Scripts/Utils.meta +8 -0
- package/Runtime/Scripts.meta +8 -0
- package/Runtime/Settings/Resources.meta +8 -0
- package/Runtime/Settings.meta +8 -0
- package/Runtime/VERSION +1 -0
- package/Runtime/VERSION.meta +7 -0
- package/Runtime.meta +8 -0
- package/package.json +13 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,715 @@
|
|
|
1
|
+
using HuaweiConstants;
|
|
2
|
+
using HuaweiMobileServices.Base;
|
|
3
|
+
using HuaweiMobileServices.IAP;
|
|
4
|
+
using HuaweiMobileServices.Utils;
|
|
5
|
+
using System;
|
|
6
|
+
using System.Collections.Generic;
|
|
7
|
+
using System.Linq;
|
|
8
|
+
using UnityEngine;
|
|
9
|
+
|
|
10
|
+
namespace HmsPlugin
|
|
11
|
+
{
|
|
12
|
+
public class HMSIAPManager : HMSManagerSingleton<HMSIAPManager>
|
|
13
|
+
{
|
|
14
|
+
private const string Tag = "HMSIAPManager";
|
|
15
|
+
|
|
16
|
+
private readonly HMSException IAP_NOT_AVAILABLE = new HMSException($"{Tag} IAP not available", "IAP not available", "IAP not available") { };
|
|
17
|
+
|
|
18
|
+
#region Delegates
|
|
19
|
+
|
|
20
|
+
public Action OnInitializeIAPSuccess { get; set; }
|
|
21
|
+
public Action<HMSException> OnInitializeIAPFailure { get; set; }
|
|
22
|
+
|
|
23
|
+
public Action<IList<ProductInfoResult>> OnObtainProductInfoSuccess { get; set; }
|
|
24
|
+
public Action<HMSException> OnObtainProductInfoFailure { get; set; }
|
|
25
|
+
|
|
26
|
+
public Action<ConsumeOwnedPurchaseResult> OnConsumePurchaseSuccess { get; set; }
|
|
27
|
+
public Action<HMSException> OnConsumePurchaseFailure { get; set; }
|
|
28
|
+
|
|
29
|
+
public Action<PurchaseResultInfo> OnBuyProductSuccess { get; set; }
|
|
30
|
+
public Action<int> OnBuyProductFailure { get; set; }
|
|
31
|
+
public Action<PurchaseResultInfo> OnBuyProductFailurePurchaseResultInfo { get; set; }
|
|
32
|
+
|
|
33
|
+
public Action<OwnedPurchasesResult> OnObtainOwnedPurchasesSuccess { get; set; }
|
|
34
|
+
public Action<HMSException> OnObtainOwnedPurchasesFailure { get; set; }
|
|
35
|
+
|
|
36
|
+
public Action<OwnedPurchasesResult> OnObtainOwnedPurchaseRecordSuccess { get; set; }
|
|
37
|
+
public Action<HMSException> OnObtainOwnedPurchaseRecordFailure { get; set; }
|
|
38
|
+
|
|
39
|
+
#endregion
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
#region Variable: IapClient (interface)
|
|
44
|
+
|
|
45
|
+
public IIapClient IapClient { get => iapClient; set => iapClient = value; }
|
|
46
|
+
|
|
47
|
+
private IIapClient iapClient;
|
|
48
|
+
|
|
49
|
+
#endregion
|
|
50
|
+
|
|
51
|
+
#region Variable: iapAvailable
|
|
52
|
+
|
|
53
|
+
private bool? iapAvailable = null;
|
|
54
|
+
|
|
55
|
+
#endregion
|
|
56
|
+
|
|
57
|
+
#region Variable: productInfoList
|
|
58
|
+
|
|
59
|
+
private List<ProductInfo> productInfoList = new List<ProductInfo>();
|
|
60
|
+
|
|
61
|
+
public List<ProductInfo> GetProductsList()
|
|
62
|
+
{
|
|
63
|
+
if (productInfoList.Count == 0)
|
|
64
|
+
Debug.LogWarning($"[{Tag}]: GetProductsList: productInfoList is empty.");
|
|
65
|
+
|
|
66
|
+
return productInfoList;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#endregion
|
|
70
|
+
|
|
71
|
+
#region Variable: ownedProductLists
|
|
72
|
+
|
|
73
|
+
private List<InAppPurchaseData> ownedProductList = new List<InAppPurchaseData>();
|
|
74
|
+
|
|
75
|
+
public List<InAppPurchaseData> GetAllOwnedPurchasesasList()
|
|
76
|
+
{
|
|
77
|
+
if (ownedProductList.Count == 0)
|
|
78
|
+
Debug.LogWarning($"[{Tag}]: GetownedAllProductsList: ownedProductList is empty.");
|
|
79
|
+
|
|
80
|
+
return ownedProductList;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#endregion
|
|
84
|
+
|
|
85
|
+
#region Variable: IsSandboxUser
|
|
86
|
+
|
|
87
|
+
private IsSandboxActivatedResult sandboxState;
|
|
88
|
+
public IsSandboxActivatedResult SandboxState { get => sandboxState; set => sandboxState = value; }
|
|
89
|
+
|
|
90
|
+
#endregion
|
|
91
|
+
|
|
92
|
+
#region Constructor (InitializeIAP)
|
|
93
|
+
|
|
94
|
+
public HMSIAPManager()
|
|
95
|
+
{
|
|
96
|
+
HMSManagerStart.Start(Tag, true, InitControlOfIAP);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
private void InitControlOfIAP()
|
|
100
|
+
{
|
|
101
|
+
Debug.Log($"[{Tag}]: Init Control Of IAP");
|
|
102
|
+
|
|
103
|
+
if (HMSIAPKitSettings.Instance.Settings.GetBool(HMSIAPKitSettings.InitializeOnStart))
|
|
104
|
+
{
|
|
105
|
+
InitializeIAP();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
public void InitializeIAP()
|
|
110
|
+
{
|
|
111
|
+
iapClient = Iap.GetIapClient();
|
|
112
|
+
ITask<EnvReadyResult> task = iapClient.EnvReady;
|
|
113
|
+
|
|
114
|
+
task.AddOnSuccessListener((result) =>
|
|
115
|
+
{
|
|
116
|
+
Debug.Log($"[{Tag}]: Initialize IAP SUCCESS");
|
|
117
|
+
|
|
118
|
+
iapAvailable = true;
|
|
119
|
+
OnInitializeIAPSuccess?.Invoke();
|
|
120
|
+
|
|
121
|
+
Prepare_IAP_Products();
|
|
122
|
+
|
|
123
|
+
}).AddOnFailureListener((exception) =>
|
|
124
|
+
{
|
|
125
|
+
Debug.LogError($"[{Tag}]: Error on Env Ready: " + exception.WrappedCauseMessage + " " + exception.WrappedExceptionMessage);
|
|
126
|
+
|
|
127
|
+
IapApiException iapEx = exception.AsIapApiException();
|
|
128
|
+
|
|
129
|
+
if (iapEx.Status != null || HMSResponses.UnresolvableStatusCodes.Contains(iapEx.Status.StatusCode))
|
|
130
|
+
{
|
|
131
|
+
Debug.LogError($"[{Tag}]: Cannot Start Resolution for Status Code: " + iapEx.Status.StatusCode);
|
|
132
|
+
|
|
133
|
+
OnInitializeIAPFailure?.Invoke(exception);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
iapEx.Status.StartResolutionForResult
|
|
138
|
+
(
|
|
139
|
+
(intent) =>
|
|
140
|
+
{
|
|
141
|
+
var returnEnum = (HMSResponses.IapStatusCodes)intent.GetIntExtra("returnCode");
|
|
142
|
+
if (returnEnum == HMSResponses.IapStatusCodes.ORDER_STATE_SUCCESS)
|
|
143
|
+
{
|
|
144
|
+
Debug.Log($"[{Tag}]: Success on iapEx Resolution");
|
|
145
|
+
Prepare_IAP_Products();
|
|
146
|
+
}
|
|
147
|
+
else
|
|
148
|
+
{
|
|
149
|
+
iapAvailable = false;
|
|
150
|
+
iapClient = null;
|
|
151
|
+
Debug.LogError($"[{Tag}]: ERROR on StartResolutionForResult. Return Code: " + (int)returnEnum + ". Reason: " + returnEnum);
|
|
152
|
+
OnInitializeIAPFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
(ex) =>
|
|
156
|
+
{
|
|
157
|
+
iapClient = null;
|
|
158
|
+
iapAvailable = false;
|
|
159
|
+
|
|
160
|
+
Debug.LogError($"[{Tag}]: ERROR on StartResolutionForResult: " + ex.WrappedCauseMessage + " " + ex.WrappedExceptionMessage);
|
|
161
|
+
OnInitializeIAPFailure?.Invoke(exception);
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
private void Prepare_IAP_Products()
|
|
168
|
+
{
|
|
169
|
+
|
|
170
|
+
void ConsumeControl()
|
|
171
|
+
{
|
|
172
|
+
if (!HMSIAPKitSettings.Instance.Settings.GetBool(HMSIAPKitSettings.ConsumptionOwnedItemsOnInitialize))
|
|
173
|
+
return;
|
|
174
|
+
|
|
175
|
+
RestoreOwnedPurchases((ownedPurchaseResult) =>
|
|
176
|
+
{
|
|
177
|
+
Debug.Log($"[{Tag}]: Success on Prepare_IAP_Products");
|
|
178
|
+
if (ownedPurchaseResult != null)
|
|
179
|
+
{
|
|
180
|
+
foreach (var obj in ownedPurchaseResult.InAppPurchaseDataList)
|
|
181
|
+
{
|
|
182
|
+
if (sandboxState.SandboxUser)
|
|
183
|
+
{
|
|
184
|
+
if ((IAPProductType)obj.Kind == IAPProductType.Consumable || (IAPProductType)obj.Kind == IAPProductType.NonConsumable)
|
|
185
|
+
{
|
|
186
|
+
ConsumePurchaseWithToken(obj.PurchaseToken);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
else if ((IAPProductType)obj.Kind == IAPProductType.Consumable)
|
|
190
|
+
{
|
|
191
|
+
ConsumePurchaseWithToken(obj.PurchaseToken);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
void NextPhase()
|
|
200
|
+
{
|
|
201
|
+
var consumables = HMSIAPProductListSettings.Instance.GetProductIdentifiersByType(HMSIAPProductType.Consumable);
|
|
202
|
+
var nonConsumables = HMSIAPProductListSettings.Instance.GetProductIdentifiersByType(HMSIAPProductType.NonConsumable);
|
|
203
|
+
var subscriptions = HMSIAPProductListSettings.Instance.GetProductIdentifiersByType(HMSIAPProductType.Subscription);
|
|
204
|
+
|
|
205
|
+
GetProductInfo(consumables, nonConsumables, subscriptions);
|
|
206
|
+
|
|
207
|
+
ConsumeControl();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
GetSandboxState(NextPhase);
|
|
211
|
+
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
#endregion
|
|
215
|
+
|
|
216
|
+
#region Product Info (Obtains product details configured in AppGallery Connect)
|
|
217
|
+
|
|
218
|
+
public void GetProductInfo(List<string> productIdConsumablesList, List<string> productIdNonConsumablesList, List<string> productIdSubscriptionList)
|
|
219
|
+
{
|
|
220
|
+
|
|
221
|
+
if (iapAvailable != true)
|
|
222
|
+
{
|
|
223
|
+
OnObtainProductInfoFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
224
|
+
Debug.Log($"[{Tag}]: ObtainProductInfo IAP not available");
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (!IsNullOrEmpty(productIdConsumablesList))
|
|
229
|
+
{
|
|
230
|
+
Debug.Log($"[{Tag}]: Consumable Products Available");
|
|
231
|
+
GetProduct(new List<string>(productIdConsumablesList), PriceType.IN_APP_CONSUMABLE);
|
|
232
|
+
}
|
|
233
|
+
else
|
|
234
|
+
{
|
|
235
|
+
Debug.Log($"[{Tag}]: Consumable Products Not-Available");
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (!IsNullOrEmpty(productIdNonConsumablesList))
|
|
239
|
+
{
|
|
240
|
+
Debug.Log($"[{Tag}]: Non-Consumable Products Available");
|
|
241
|
+
GetProduct(new List<string>(productIdNonConsumablesList), PriceType.IN_APP_NONCONSUMABLE);
|
|
242
|
+
}
|
|
243
|
+
else
|
|
244
|
+
{
|
|
245
|
+
Debug.Log($"[{Tag}]: Non-Consumable Products Not-Available");
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (!IsNullOrEmpty(productIdSubscriptionList))
|
|
249
|
+
{
|
|
250
|
+
Debug.Log($"[{Tag}]: Subscription Products Available");
|
|
251
|
+
GetProduct(new List<string>(productIdSubscriptionList), PriceType.IN_APP_SUBSCRIPTION);
|
|
252
|
+
}
|
|
253
|
+
else
|
|
254
|
+
{
|
|
255
|
+
Debug.Log($"[{Tag}]: Subscription Products Not-Available");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
private void GetProduct(IList<string> productIdList, PriceType priceType)
|
|
260
|
+
{
|
|
261
|
+
if (iapAvailable != true)
|
|
262
|
+
{
|
|
263
|
+
Debug.Log($"[{Tag}]: IAP not available");
|
|
264
|
+
|
|
265
|
+
OnObtainProductInfoFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
ProductInfoReq productInfoReq = new ProductInfoReq
|
|
270
|
+
{
|
|
271
|
+
PriceType = priceType,
|
|
272
|
+
ProductIds = productIdList
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
iapClient.ObtainProductInfo(productInfoReq).AddOnSuccessListener((type) =>
|
|
276
|
+
{
|
|
277
|
+
HashSet<string> productIds = new HashSet<string>(productInfoList.Select(p => p.ProductId));
|
|
278
|
+
var listProductInfo = type.ProductInfoList.ToList();
|
|
279
|
+
|
|
280
|
+
foreach (var productInfo in listProductInfo)
|
|
281
|
+
{
|
|
282
|
+
if (!productIds.Contains(productInfo.ProductId))
|
|
283
|
+
{
|
|
284
|
+
productInfoList.Add(productInfo);
|
|
285
|
+
productIds.Add(productInfo.ProductId);
|
|
286
|
+
Debug.Log($"[{Tag}]: Available Product Info - Product Type: {(IAPProductType)priceType.Value} - ProductId: " + productInfo.ProductId);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
OnObtainProductInfoSuccess?.Invoke(new List<ProductInfoResult> { type });
|
|
290
|
+
|
|
291
|
+
}).AddOnFailureListener((exception) =>
|
|
292
|
+
{
|
|
293
|
+
Debug.LogError($"[{Tag}]: Fail Message - Product Type: {(IAPProductType)priceType.Value} failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
|
|
294
|
+
OnObtainProductInfoFailure?.Invoke(exception);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
#endregion
|
|
299
|
+
|
|
300
|
+
#region Owned Products
|
|
301
|
+
|
|
302
|
+
public void GetAllOwnedPurchases()
|
|
303
|
+
{
|
|
304
|
+
ObtainOwnedPurchases(PriceType.IN_APP_CONSUMABLE);
|
|
305
|
+
ObtainOwnedPurchases(PriceType.IN_APP_NONCONSUMABLE);
|
|
306
|
+
ObtainOwnedPurchases(PriceType.IN_APP_SUBSCRIPTION);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
public void ObtainOwnedPurchases(PriceType priceType)
|
|
310
|
+
{
|
|
311
|
+
if (iapAvailable != true)
|
|
312
|
+
{
|
|
313
|
+
OnObtainOwnedPurchasesFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
ObtainOwnedPurchasesRequest(priceType);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
private void ObtainOwnedPurchasesRequest(PriceType priceType)
|
|
321
|
+
{
|
|
322
|
+
var ownedPurchasesReq = new OwnedPurchasesReq() { PriceType = priceType };
|
|
323
|
+
|
|
324
|
+
ITask<OwnedPurchasesResult> task = iapClient.ObtainOwnedPurchases(ownedPurchasesReq);
|
|
325
|
+
|
|
326
|
+
/* Queries purchase data of the products that a user has bought.
|
|
327
|
+
For consumables, this method returns purchase data of those already bought but not consumed.
|
|
328
|
+
For non-consumables, this method returns purchase data of all the products that have been bought.
|
|
329
|
+
For subscriptions, this method returns only the currently active subscription relationships. */
|
|
330
|
+
|
|
331
|
+
task.AddOnSuccessListener((result) =>
|
|
332
|
+
{
|
|
333
|
+
foreach (InAppPurchaseData purchaseData in result.InAppPurchaseDataList)
|
|
334
|
+
{
|
|
335
|
+
if (!ownedProductList.Exists(c => c.ProductId == purchaseData.ProductId))
|
|
336
|
+
{
|
|
337
|
+
ownedProductList.Add(purchaseData);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
Debug.Log($"[{Tag}]: Obtain Owned Purchases Request success. result.count:{result.ItemList.Count}");
|
|
342
|
+
OnObtainOwnedPurchasesSuccess?.Invoke(result);
|
|
343
|
+
}).AddOnFailureListener((exception) =>
|
|
344
|
+
{
|
|
345
|
+
Debug.LogError($"[{Tag}]: Obtain Owned Purchases Request failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
|
|
346
|
+
OnObtainOwnedPurchasesFailure?.Invoke(exception);
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
#endregion
|
|
351
|
+
|
|
352
|
+
#region PurchaseRecords (Obtains the purchase information of all consumed products or the receipts of all subscriptions.)
|
|
353
|
+
public void GetPurchaseRecords()
|
|
354
|
+
{
|
|
355
|
+
if (iapAvailable != true)
|
|
356
|
+
{
|
|
357
|
+
OnObtainOwnedPurchaseRecordFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
ObtainOwnedPurchaseRecord(PriceType.IN_APP_CONSUMABLE);
|
|
362
|
+
ObtainOwnedPurchaseRecord(PriceType.IN_APP_NONCONSUMABLE);
|
|
363
|
+
ObtainOwnedPurchaseRecord(PriceType.IN_APP_SUBSCRIPTION);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
private void ObtainOwnedPurchaseRecord(PriceType priceType)
|
|
367
|
+
{
|
|
368
|
+
|
|
369
|
+
if (iapAvailable != true)
|
|
370
|
+
{
|
|
371
|
+
OnObtainOwnedPurchaseRecordFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
var ownedPurchaseRequest = new OwnedPurchasesReq() { PriceType = priceType };
|
|
376
|
+
|
|
377
|
+
ITask<OwnedPurchasesResult> task = iapClient.ObtainOwnedPurchaseRecord(ownedPurchaseRequest);
|
|
378
|
+
|
|
379
|
+
task.AddOnSuccessListener((result) =>
|
|
380
|
+
{
|
|
381
|
+
OnObtainOwnedPurchaseRecordSuccess?.Invoke(result);
|
|
382
|
+
|
|
383
|
+
}).AddOnFailureListener((exception) =>
|
|
384
|
+
{
|
|
385
|
+
Debug.LogError($"[{Tag}]: ObtainOwnedPurchaseRecord - Fail");
|
|
386
|
+
|
|
387
|
+
OnObtainOwnedPurchaseRecordFailure?.Invoke(exception);
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
#endregion
|
|
392
|
+
|
|
393
|
+
#region Consume
|
|
394
|
+
|
|
395
|
+
public void ConsumePurchase(InAppPurchaseData inAppPurchaseData)
|
|
396
|
+
{
|
|
397
|
+
string purchaseToken = inAppPurchaseData.PurchaseToken;
|
|
398
|
+
ConsumePurchaseWithToken(purchaseToken);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
public void ConsumePurchaseWithToken(string token)
|
|
402
|
+
{
|
|
403
|
+
if (iapAvailable != true)
|
|
404
|
+
{
|
|
405
|
+
OnObtainProductInfoFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
ConsumeOwnedPurchaseReq consumeOwnedPurchaseReq = new ConsumeOwnedPurchaseReq
|
|
410
|
+
{
|
|
411
|
+
PurchaseToken = token
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
ITask<ConsumeOwnedPurchaseResult> task = iapClient.ConsumeOwnedPurchase(consumeOwnedPurchaseReq);
|
|
415
|
+
|
|
416
|
+
task.AddOnSuccessListener((result) =>
|
|
417
|
+
{
|
|
418
|
+
Debug.Log($"[{Tag}]: ConsumePurchaseWithToken - Product Id: " + result.ConsumePurchaseData.ProductId);
|
|
419
|
+
OnConsumePurchaseSuccess?.Invoke(result);
|
|
420
|
+
|
|
421
|
+
}).AddOnFailureListener((exception) =>
|
|
422
|
+
{
|
|
423
|
+
Debug.LogError($"[{Tag}]: ConsumePurchaseWithToken - Fail - CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage + ", Message: " + exception.Message + "exception.ErrorCode " + exception.ErrorCode);
|
|
424
|
+
OnConsumePurchaseFailure?.Invoke(exception);
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
#endregion
|
|
429
|
+
|
|
430
|
+
#region Purchase
|
|
431
|
+
|
|
432
|
+
public void PurchaseProduct(string productId, string developerPayload = "", bool consume = true)
|
|
433
|
+
{
|
|
434
|
+
Debug.Log($"[{Tag}]: PurchaseProduct");
|
|
435
|
+
|
|
436
|
+
var productInfo = GetProductInfo(productId);
|
|
437
|
+
|
|
438
|
+
if (productInfo != null)
|
|
439
|
+
{
|
|
440
|
+
PurchaseProductMethod(productInfo, developerPayload, consume);
|
|
441
|
+
}
|
|
442
|
+
else
|
|
443
|
+
{
|
|
444
|
+
Debug.LogError($"[{Tag}]: {productId} could not be found in retrieved product list!");
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
private void PurchaseProductMethod(ProductInfo productInfo, string developerPayload, bool consume)
|
|
449
|
+
{
|
|
450
|
+
Debug.Log($"[{Tag}]: PurchaseProductMethod");
|
|
451
|
+
|
|
452
|
+
if (iapAvailable != true)
|
|
453
|
+
{
|
|
454
|
+
OnObtainProductInfoFailure?.Invoke(IAP_NOT_AVAILABLE);
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
PurchaseIntentReq purchaseIntentReq = new PurchaseIntentReq
|
|
459
|
+
{
|
|
460
|
+
PriceType = productInfo.PriceType,
|
|
461
|
+
ProductId = productInfo.ProductId,
|
|
462
|
+
DeveloperPayload = developerPayload,
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
bool isSubscription = (IAPProductType)productInfo.PriceType.Value == IAPProductType.Subscription;
|
|
466
|
+
bool isConsumable = (IAPProductType)productInfo.PriceType.Value == IAPProductType.Consumable;
|
|
467
|
+
bool isNonConsumable = (IAPProductType)productInfo.PriceType.Value == IAPProductType.NonConsumable;
|
|
468
|
+
|
|
469
|
+
ITask<PurchaseIntentResult> task = iapClient.CreatePurchaseIntent(purchaseIntentReq);
|
|
470
|
+
|
|
471
|
+
task.AddOnSuccessListener((result) =>
|
|
472
|
+
{
|
|
473
|
+
if (result == null)
|
|
474
|
+
return;
|
|
475
|
+
|
|
476
|
+
Debug.Log($"[{Tag}]: PurchaseProduct - Success - ProductID: {purchaseIntentReq.ProductId} - Result: {result.ErrMsg + result.ReturnCode}");
|
|
477
|
+
|
|
478
|
+
Status status = result.Status;
|
|
479
|
+
|
|
480
|
+
status.StartResolutionForResult((androidIntent) =>
|
|
481
|
+
{
|
|
482
|
+
PurchaseResultInfo purchaseResultInfo = iapClient.ParsePurchaseResultInfoFromIntent(androidIntent);
|
|
483
|
+
|
|
484
|
+
if (purchaseResultInfo.ReturnCode == OrderStatusCode.ORDER_STATE_SUCCESS)
|
|
485
|
+
{
|
|
486
|
+
Debug.Log($"[{Tag}]: Purchase Result Info - ProductId: {purchaseResultInfo.InAppPurchaseData.ProductId} - InAppDataSignature: {purchaseResultInfo.InAppDataSignature}");
|
|
487
|
+
|
|
488
|
+
OnBuyProductSuccess.Invoke(purchaseResultInfo);
|
|
489
|
+
|
|
490
|
+
if (consume)
|
|
491
|
+
ConsumePurchase(purchaseResultInfo.InAppPurchaseData);
|
|
492
|
+
else
|
|
493
|
+
Debug.LogWarning($"[{Tag}]: Consume is false. Please aware of the situation. You should consume the product by your own. ProductID: {purchaseIntentReq.ProductId}");
|
|
494
|
+
/*if (sandboxState.SandboxUser)
|
|
495
|
+
{
|
|
496
|
+
if (isConsumable || isNonConsumable)
|
|
497
|
+
{
|
|
498
|
+
ConsumePurchase(purchaseResultInfo.InAppPurchaseData);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
else if (isConsumable)
|
|
502
|
+
{
|
|
503
|
+
ConsumePurchase(purchaseResultInfo.InAppPurchaseData);
|
|
504
|
+
}*/
|
|
505
|
+
}
|
|
506
|
+
else
|
|
507
|
+
{
|
|
508
|
+
switch (purchaseResultInfo.ReturnCode)
|
|
509
|
+
{
|
|
510
|
+
case OrderStatusCode.ORDER_STATE_CANCEL:
|
|
511
|
+
Debug.LogError($"[{Tag}]: User Cancel Payment");
|
|
512
|
+
break;
|
|
513
|
+
|
|
514
|
+
case OrderStatusCode.ORDER_STATE_FAILED:
|
|
515
|
+
Debug.LogError($"[{Tag}]: Order Payment Failed");
|
|
516
|
+
break;
|
|
517
|
+
|
|
518
|
+
case OrderStatusCode.ORDER_PRODUCT_OWNED:
|
|
519
|
+
if (isSubscription)
|
|
520
|
+
{
|
|
521
|
+
Debug.Log($"[{Tag}]: Subscription - PurchaseResultInfo.ReturnCode: {purchaseResultInfo.ReturnCode}");
|
|
522
|
+
RedirectingtoSubscriptionEditingScreen(productInfo.ProductId);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
Debug.LogError($"[{Tag}]: Product Owned");
|
|
527
|
+
break;
|
|
528
|
+
|
|
529
|
+
case OrderStatusCode.ORDER_STATE_PARAM_ERROR:
|
|
530
|
+
case OrderStatusCode.ORDER_STATE_IAP_NOT_ACTIVATED:
|
|
531
|
+
case OrderStatusCode.ORDER_STATE_PRODUCT_INVALID:
|
|
532
|
+
case OrderStatusCode.ORDER_STATE_CALLS_FREQUENT:
|
|
533
|
+
case OrderStatusCode.ORDER_STATE_NET_ERROR:
|
|
534
|
+
case OrderStatusCode.ORDER_STATE_PMS_TYPE_NOT_MATCH:
|
|
535
|
+
case OrderStatusCode.ORDER_STATE_PRODUCT_COUNTRY_NOT_SUPPORTED:
|
|
536
|
+
case OrderStatusCode.ORDER_VR_UNINSTALL_ERROR:
|
|
537
|
+
case OrderStatusCode.ORDER_HWID_NOT_LOGIN:
|
|
538
|
+
case OrderStatusCode.ORDER_PRODUCT_NOT_OWNED:
|
|
539
|
+
case OrderStatusCode.ORDER_PRODUCT_CONSUMED:
|
|
540
|
+
case OrderStatusCode.ORDER_ACCOUNT_AREA_NOT_SUPPORTED:
|
|
541
|
+
case OrderStatusCode.ORDER_NOT_ACCEPT_AGREEMENT:
|
|
542
|
+
case OrderStatusCode.ORDER_HIGH_RISK_OPERATIONS:
|
|
543
|
+
case OrderStatusCode.ORDER_STATE_PENDING:
|
|
544
|
+
Debug.LogError($"[{Tag}] - ReturnCode: {purchaseResultInfo.ReturnCode} : {Enum.GetName(typeof(OrderStatusCode), purchaseResultInfo.ReturnCode)}");
|
|
545
|
+
break;
|
|
546
|
+
|
|
547
|
+
default:
|
|
548
|
+
// All cases are handled
|
|
549
|
+
Debug.LogError($"[{Tag}]: BuyProduct failed. ReturnCode: " + purchaseResultInfo.ReturnCode + ", ErrorMsg: " + purchaseResultInfo.ErrMsg);
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
OnBuyProductFailure?.Invoke(purchaseResultInfo.ReturnCode);
|
|
553
|
+
OnBuyProductFailurePurchaseResultInfo?.Invoke(purchaseResultInfo);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
}, (exception) =>
|
|
557
|
+
{
|
|
558
|
+
Debug.LogError($"[{Tag}]: startIntent ERROR");
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
}).AddOnFailureListener((exception) =>
|
|
562
|
+
{
|
|
563
|
+
Debug.LogError($"[{Tag}]: BuyProduct failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
#endregion
|
|
568
|
+
|
|
569
|
+
#region Restore
|
|
570
|
+
|
|
571
|
+
public void RestoreOwnedPurchases(Action<OwnedPurchasesResult> action)
|
|
572
|
+
{
|
|
573
|
+
OnObtainOwnedPurchasesSuccess += (ownedPurchaseResult) =>
|
|
574
|
+
{
|
|
575
|
+
action?.Invoke(ownedPurchaseResult);
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
OnObtainOwnedPurchasesFailure += (error) =>
|
|
579
|
+
{
|
|
580
|
+
Debug.LogError($"[{Tag}]: RestorePurchasesError failed. CauseMessage: " + error.WrappedCauseMessage + ", ExceptionMessage: " + error.WrappedExceptionMessage);
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
GetAllOwnedPurchases();
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
public void RestorePurchaseRecords(Action<OwnedPurchasesResult> action)
|
|
587
|
+
{
|
|
588
|
+
Debug.Log($"[{Tag}]: RestorePurchases");
|
|
589
|
+
|
|
590
|
+
OnObtainOwnedPurchaseRecordSuccess += (ownedPurchaseResult) =>
|
|
591
|
+
{
|
|
592
|
+
action?.Invoke(ownedPurchaseResult);
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
OnObtainOwnedPurchaseRecordFailure += (error) =>
|
|
596
|
+
{
|
|
597
|
+
Debug.LogError($"[{Tag}]: RestorePurchasesError failed. CauseMessage: " + error.WrappedCauseMessage + ", ExceptionMessage: " + error.WrappedExceptionMessage);
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
GetPurchaseRecords();
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
#endregion
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
#region Utils
|
|
607
|
+
|
|
608
|
+
public bool IsNullOrEmpty(List<string> array)
|
|
609
|
+
{
|
|
610
|
+
return (array == null || array.Count == 0);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
public ProductInfo GetProductInfo(string productID)
|
|
614
|
+
{
|
|
615
|
+
return productInfoList.Find(productInfo => productInfo.ProductId == productID);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
public bool isUserOwnThisProduct(string productID)
|
|
619
|
+
{
|
|
620
|
+
return ownedProductList.Exists(c => c.ProductId == productID);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
public bool isIapAvailable()
|
|
624
|
+
{
|
|
625
|
+
return (iapAvailable != null) ? (bool)iapAvailable : false;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
#endregion
|
|
629
|
+
|
|
630
|
+
#region Sandbox
|
|
631
|
+
|
|
632
|
+
public void GetSandboxState(Action nextPhase)
|
|
633
|
+
{
|
|
634
|
+
if (iapClient != null)
|
|
635
|
+
{
|
|
636
|
+
var task = iapClient.SandboxActivated;
|
|
637
|
+
|
|
638
|
+
task.AddOnSuccessListener((result) =>
|
|
639
|
+
{
|
|
640
|
+
Debug.Log($"[{Tag}]: Sandbox Is Active = {result.SandboxUser}");
|
|
641
|
+
|
|
642
|
+
sandboxState = result;
|
|
643
|
+
|
|
644
|
+
nextPhase?.Invoke();
|
|
645
|
+
|
|
646
|
+
}).AddOnFailureListener((exception) =>
|
|
647
|
+
{
|
|
648
|
+
Debug.LogError($"[{Tag}]: IsSandboxActivated Failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
else
|
|
652
|
+
{
|
|
653
|
+
Debug.LogError($"[{Tag}]: Sandbox Activated Failed. IAP is not initialized.");
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
#endregion
|
|
658
|
+
|
|
659
|
+
#region SubscriptionScreens
|
|
660
|
+
|
|
661
|
+
public void RedirectingtoSubscriptionEditingScreen(string SubscribeProductId)
|
|
662
|
+
{
|
|
663
|
+
|
|
664
|
+
StartIapActivityReq req = new StartIapActivityReq
|
|
665
|
+
{
|
|
666
|
+
SubscribeProductId = SubscribeProductId,
|
|
667
|
+
Type = StartIapActivityReq.TYPE_SUBSCRIBE_EDIT_ACTIVITY
|
|
668
|
+
};
|
|
669
|
+
var task = iapClient.StartIapActivity(req);
|
|
670
|
+
task.AddOnFailureListener(
|
|
671
|
+
exception =>
|
|
672
|
+
{
|
|
673
|
+
Debug.LogError($"[{Tag}]: RedirectingtoSubscriptionEditingScreen error" + exception);
|
|
674
|
+
}
|
|
675
|
+
);
|
|
676
|
+
task.AddOnSuccessListener(activity =>
|
|
677
|
+
{
|
|
678
|
+
activity.StartActivity();
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
public void RedirectingtoSubscriptionManagementScreen()
|
|
683
|
+
{
|
|
684
|
+
|
|
685
|
+
StartIapActivityReq req = new StartIapActivityReq
|
|
686
|
+
{
|
|
687
|
+
Type = StartIapActivityReq.TYPE_SUBSCRIBE_MANAGER_ACTIVITY
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
var task = iapClient.StartIapActivity(req);
|
|
691
|
+
|
|
692
|
+
task.AddOnSuccessListener(activity =>
|
|
693
|
+
{
|
|
694
|
+
activity.StartActivity();
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
task.AddOnFailureListener(
|
|
698
|
+
exception =>
|
|
699
|
+
{
|
|
700
|
+
Debug.LogError($"[{Tag}]: RedirectingtoSubscriptionManagementScreen error" + exception);
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
#endregion
|
|
706
|
+
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
public enum IAPProductType
|
|
711
|
+
{
|
|
712
|
+
Consumable = 0,
|
|
713
|
+
NonConsumable = 1,
|
|
714
|
+
Subscription = 2
|
|
715
|
+
}
|