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,977 @@
|
|
|
1
|
+
using HuaweiConstants;
|
|
2
|
+
using HuaweiMobileServices.Ads;
|
|
3
|
+
using HuaweiMobileServices.Ads.InstallReferrer;
|
|
4
|
+
using HuaweiMobileServices.Utils;
|
|
5
|
+
using System;
|
|
6
|
+
using System.Collections;
|
|
7
|
+
using System.Collections.Generic;
|
|
8
|
+
using System.Threading.Tasks;
|
|
9
|
+
using UnityEngine;
|
|
10
|
+
using static HuaweiConstants.UnityBannerAdPositionCode;
|
|
11
|
+
using static HuaweiMobileServices.Ads.SplashAd;
|
|
12
|
+
|
|
13
|
+
namespace HmsPlugin
|
|
14
|
+
{
|
|
15
|
+
|
|
16
|
+
public class HMSAdsKitManager : HMSManagerSingleton<HMSAdsKitManager>
|
|
17
|
+
{
|
|
18
|
+
#region CONSTANTS
|
|
19
|
+
private const string TAG = "[HMS] HMSAdsKitManager";
|
|
20
|
+
private const string TestBannerAdId = "testw6vs28auh3";
|
|
21
|
+
private const string TestInterstitialAdId = "testb4znbuh3n2";
|
|
22
|
+
private const string TestRewardedAdId = "testx9dtjwj8hp";
|
|
23
|
+
private const string TestSplashImageAdId = "testq6zq98hecj";
|
|
24
|
+
private const string TestSplashVideoAdId = "testd7c5cewoj6";
|
|
25
|
+
private const string DefaultIcon = "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; // 1x1 transparent pixel(base64 encoded)
|
|
26
|
+
|
|
27
|
+
#endregion
|
|
28
|
+
|
|
29
|
+
#region PRIVATE_MEMBERS
|
|
30
|
+
private BannerAd bannerView;
|
|
31
|
+
private InterstitialAd interstitialView;
|
|
32
|
+
private RewardAd rewardedView;
|
|
33
|
+
private SplashAd splashView;
|
|
34
|
+
private HMSSettings adsKitSettings;
|
|
35
|
+
private bool isInitialized;
|
|
36
|
+
private InstallReferrerClient installReferrerClient;
|
|
37
|
+
private AdLoadMethod rewardedAdLoadMethod;
|
|
38
|
+
private AdLoadMethod bannerAdLoadMethod;
|
|
39
|
+
private AdLoadMethod interstitialAdLoadMethod;
|
|
40
|
+
private AdLoadMethod splashAdLoadMethod;
|
|
41
|
+
private bool HasPurchasedNoAds { get; set; }
|
|
42
|
+
private RewardVerifyConfig rewardVerifyConfig { get; set; }
|
|
43
|
+
#endregion
|
|
44
|
+
|
|
45
|
+
#region PROPERTIES
|
|
46
|
+
public Action<ReferrerDetails> InstallReferrerSuccess { get; set; }
|
|
47
|
+
public Action<InstallReferrerResponse> InstallReferrerFail { get; set; }
|
|
48
|
+
public Action InstallReferrerDisconnect { get; set; }
|
|
49
|
+
public Action DefaultLoadRewardAd { get; set; }
|
|
50
|
+
public Action<UnityBannerAdPositionCodeType, UnityBannerAdSizeType> DefaultLoadBannerAd { get; set; }
|
|
51
|
+
public Action DefaultLoadInterstitialAd { get; set; }
|
|
52
|
+
public Action DefaultLoadSplashAd { get; set; }
|
|
53
|
+
#endregion
|
|
54
|
+
|
|
55
|
+
public HMSAdsKitManager(Builder builder)
|
|
56
|
+
{
|
|
57
|
+
Debug.Log($"{TAG} HMSAdsKitManager Builder Constructor. {builder.rewardedAdLoadMethod.ToString()}");
|
|
58
|
+
this.HasPurchasedNoAds = builder.HasPurchasedNoAds;
|
|
59
|
+
this.rewardedAdLoadMethod = builder.rewardedAdLoadMethod;
|
|
60
|
+
this.bannerAdLoadMethod = builder.bannerAdLoadMethod;
|
|
61
|
+
this.interstitialAdLoadMethod = builder.interstitialAdLoadMethod;
|
|
62
|
+
this.splashAdLoadMethod = builder.splashAdLoadMethod;
|
|
63
|
+
this.rewardVerifyConfig = builder.rewardVerifyConfig;
|
|
64
|
+
adsKitSettings = HMSAdsKitSettings.Instance.Settings;
|
|
65
|
+
|
|
66
|
+
HMSManagerStart.Start(OnAwake, () => OnStart(HasPurchasedNoAds), TAG);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public HMSAdsKitManager() : this(false) { }
|
|
70
|
+
|
|
71
|
+
public HMSAdsKitManager(bool hasPurchasedNoAds)
|
|
72
|
+
{
|
|
73
|
+
HasPurchasedNoAds = hasPurchasedNoAds;
|
|
74
|
+
adsKitSettings = HMSAdsKitSettings.Instance.Settings;
|
|
75
|
+
HMSManagerStart.Start(OnAwake, () => OnStart(HasPurchasedNoAds), TAG);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private void OnAwake()
|
|
79
|
+
{
|
|
80
|
+
Debug.Log($"{TAG} OnAwake");
|
|
81
|
+
InitializeAdsKit();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private void OnStart(bool hasPurchasedNoAds = false)
|
|
85
|
+
{
|
|
86
|
+
Debug.Log($"{TAG} OnStart");
|
|
87
|
+
_ = LoadAdsWhenInternetIsAvailableAsync(hasPurchasedNoAds);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private void InitializeAdsKit()
|
|
91
|
+
{
|
|
92
|
+
Debug.Log($"{TAG} Init");
|
|
93
|
+
|
|
94
|
+
isInitialized = true;
|
|
95
|
+
|
|
96
|
+
InitAds();
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private void InitAds()
|
|
101
|
+
{
|
|
102
|
+
HwAds.Init("117622789");
|
|
103
|
+
Debug.Log($"{TAG} Init done");
|
|
104
|
+
|
|
105
|
+
//If you want select with config you can change this method, also you can active account kit for this method
|
|
106
|
+
AssignDefaultLoadRewardAd(this.rewardedAdLoadMethod);
|
|
107
|
+
AssignDefaultBannerAdLoad(this.bannerAdLoadMethod);
|
|
108
|
+
AssignDefaultInterstitialAdLoad(this.interstitialAdLoadMethod);
|
|
109
|
+
AssignDefaultSplashAdLoad(this.splashAdLoadMethod);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private async Task LoadAdsWhenInternetIsAvailableAsync(bool hasPurchasedNoAds = false)
|
|
113
|
+
{
|
|
114
|
+
await WaitForInternetConnectionAsync();
|
|
115
|
+
Debug.Log($"{TAG} Loading Ads");
|
|
116
|
+
LoadAllAds(hasPurchasedNoAds);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private async Task WaitForInternetConnectionAsync()
|
|
120
|
+
{
|
|
121
|
+
while (Application.internetReachability == NetworkReachability.NotReachable)
|
|
122
|
+
{
|
|
123
|
+
await Task.Delay(TimeSpan.FromSeconds(1));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public void LoadAllAds(bool hasPurchasedNoAds = false)
|
|
128
|
+
{
|
|
129
|
+
if (!hasPurchasedNoAds)
|
|
130
|
+
{
|
|
131
|
+
LoadAds();
|
|
132
|
+
}
|
|
133
|
+
DefaultLoadRewardAd?.Invoke();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private void LoadAds()
|
|
137
|
+
{
|
|
138
|
+
if (adsKitSettings.GetBool(HMSAdsKitSettings.EnableSplashAd))
|
|
139
|
+
{
|
|
140
|
+
DefaultLoadSplashAd?.Invoke();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
var adPositionCodeType = ParseEnum<UnityBannerAdPositionCodeType>(HMSAdsKitSettings.BannerAdPositionType, UnityBannerAdPositionCodeType.POSITION_BOTTOM);
|
|
144
|
+
var adSizeType = ParseEnum<UnityBannerAdSizeType>(HMSAdsKitSettings.UnityBannerAdSizeType, UnityBannerAdSizeType.BANNER_SIZE_360_57);
|
|
145
|
+
|
|
146
|
+
DefaultLoadBannerAd?.Invoke(adPositionCodeType, adSizeType);
|
|
147
|
+
Debug.Log($"{TAG} Loading All Ads");
|
|
148
|
+
DefaultLoadInterstitialAd?.Invoke();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
private T ParseEnum<T>(string key, T defaultValue) where T : struct
|
|
152
|
+
{
|
|
153
|
+
return Enum.TryParse(adsKitSettings.Get(key), out T result) ? result : defaultValue;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
public void SetTestAdStatus(bool value)
|
|
157
|
+
{
|
|
158
|
+
adsKitSettings.SetBool(HMSAdsKitSettings.UseTestAds, value);
|
|
159
|
+
Debug.Log($"{TAG} SetTestAdStatus set to " + value);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
public void SetTestAd(bool status)
|
|
163
|
+
{
|
|
164
|
+
SetTestAdStatus(status);
|
|
165
|
+
DestroyBannerAd();
|
|
166
|
+
LoadAllAds();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
public enum AdLoadMethod
|
|
170
|
+
{
|
|
171
|
+
Default,
|
|
172
|
+
WithAdId,
|
|
173
|
+
WithConfig
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
#region Install-Referrer
|
|
177
|
+
|
|
178
|
+
public void Init_InstallReferrer(bool isTest)
|
|
179
|
+
{
|
|
180
|
+
|
|
181
|
+
var installReferrerStateCallbackListener =
|
|
182
|
+
new InstallReferrerStateCallbackListener(
|
|
183
|
+
OnInstallReferrerSetupFinished,
|
|
184
|
+
OnInstallReferrerServiceDisconnected);
|
|
185
|
+
|
|
186
|
+
InstallReferrerStateBridge.SetInstallReferrerCallbackListener(installReferrerStateCallbackListener);
|
|
187
|
+
|
|
188
|
+
var listener = InstallReferrerStateBridge.GetInstallReferrerStateCallback();
|
|
189
|
+
|
|
190
|
+
HMSDispatcher.Invoke(() =>
|
|
191
|
+
{
|
|
192
|
+
installReferrerClient = InstallReferrerClient.NewBuilder().SetTest(isTest).Build();
|
|
193
|
+
installReferrerClient.StartConnection(listener);
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
private void OnInstallReferrerSetupFinished(int responseCode)
|
|
199
|
+
{
|
|
200
|
+
Debug.Log($"{TAG} OnInstallReferrerSetupFinished");
|
|
201
|
+
|
|
202
|
+
var response = (InstallReferrerResponse)(responseCode);
|
|
203
|
+
|
|
204
|
+
if (response == InstallReferrerResponse.OK)
|
|
205
|
+
{
|
|
206
|
+
Debug.Log($"{TAG} Install Referrer Setup Finished");
|
|
207
|
+
|
|
208
|
+
var referrerDetails = installReferrerClient.GetInstallReferrer();
|
|
209
|
+
|
|
210
|
+
InstallReferrerSuccess?.Invoke(referrerDetails);
|
|
211
|
+
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (response == InstallReferrerResponse.SERVICE_UNAVAILABLE)
|
|
216
|
+
{
|
|
217
|
+
Debug.LogError($"{TAG} InstallReferrerResponse: SERVICE_UNAVAILABLE");
|
|
218
|
+
|
|
219
|
+
InstallReferrerFail?.Invoke(response);
|
|
220
|
+
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (response == InstallReferrerResponse.FEATURE_NOT_SUPPORTED)
|
|
225
|
+
{
|
|
226
|
+
Debug.LogError($"{TAG} FEATURE_NOT_SUPPORTED");
|
|
227
|
+
|
|
228
|
+
InstallReferrerFail?.Invoke(response);
|
|
229
|
+
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (response == InstallReferrerResponse.DEVELOPER_ERROR)
|
|
234
|
+
{
|
|
235
|
+
Debug.LogError($"{TAG} DEVELOPER_ERROR");
|
|
236
|
+
|
|
237
|
+
InstallReferrerFail?.Invoke(response);
|
|
238
|
+
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
private void OnInstallReferrerServiceDisconnected()
|
|
245
|
+
{
|
|
246
|
+
Debug.Log($"{TAG} OnInstallReferrerServiceDisconnected");
|
|
247
|
+
|
|
248
|
+
InstallReferrerDisconnect?.Invoke();
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
#endregion
|
|
252
|
+
|
|
253
|
+
#region BANNER
|
|
254
|
+
|
|
255
|
+
#region PUBLIC METHODS
|
|
256
|
+
|
|
257
|
+
public void LoadBannerAd(UnityBannerAdPositionCodeType position, string bannerSize = UnityBannerAdSize.BANNER_SIZE_320_50)
|
|
258
|
+
{
|
|
259
|
+
LoadBannerAd(
|
|
260
|
+
adsKitSettings.GetBool(HMSAdsKitSettings.UseTestAds) ? TestBannerAdId : adsKitSettings.Get(HMSAdsKitSettings.BannerAdID),
|
|
261
|
+
position,
|
|
262
|
+
bannerSize
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
public void LoadBannerAd(string adId, UnityBannerAdPositionCodeType position, string bannerSize = UnityBannerAdSize.BANNER_SIZE_320_50)
|
|
267
|
+
{
|
|
268
|
+
if (!isInitialized || !adsKitSettings.GetBool(HMSAdsKitSettings.EnableBannerAd)) return;
|
|
269
|
+
|
|
270
|
+
Debug.Log($"{TAG} Loading Banner Ad.");
|
|
271
|
+
|
|
272
|
+
var bannerAdStatusListener = CreateBannerAdStatusListener();
|
|
273
|
+
|
|
274
|
+
bannerView = new BannerAd(bannerAdStatusListener)
|
|
275
|
+
{
|
|
276
|
+
AdId = adId,
|
|
277
|
+
PositionType = (int)position,
|
|
278
|
+
SizeType = bannerSize,
|
|
279
|
+
AdStatusListener = bannerAdStatusListener
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
string bannerRefreshInterval = adsKitSettings.Get(HMSAdsKitSettings.BannerRefreshInterval);
|
|
283
|
+
if (long.TryParse(bannerRefreshInterval, out long bannerRefresh))
|
|
284
|
+
{
|
|
285
|
+
bannerView.BannerRefresh = bannerRefresh;
|
|
286
|
+
}
|
|
287
|
+
else if (!string.IsNullOrEmpty(bannerRefreshInterval))
|
|
288
|
+
{
|
|
289
|
+
Debug.Log($"{TAG} Failed to parse BannerRefreshInterval.");
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
_isBannerAdLoaded = false;
|
|
293
|
+
bannerView.LoadBanner(new AdParam.Builder().Build());
|
|
294
|
+
|
|
295
|
+
if (adsKitSettings.GetBool(HMSAdsKitSettings.ShowBannerOnLoad))
|
|
296
|
+
{
|
|
297
|
+
bannerView?.ShowBanner();
|
|
298
|
+
}
|
|
299
|
+
else
|
|
300
|
+
{
|
|
301
|
+
bannerView?.HideBanner();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
private AdStatusListener CreateBannerAdStatusListener()
|
|
306
|
+
{
|
|
307
|
+
var bannerAdStatusListener = new AdStatusListener();
|
|
308
|
+
bannerAdStatusListener.mOnAdLoaded += BannerAdStatusListener_mOnAdLoaded;
|
|
309
|
+
bannerAdStatusListener.mOnAdClosed += BannerAdStatusListener_mOnAdClosed;
|
|
310
|
+
bannerAdStatusListener.mOnAdImpression += BannerAdStatusListener_mOnAdImpression;
|
|
311
|
+
bannerAdStatusListener.mOnAdClicked += BannerAdStatusListener_mOnAdClicked;
|
|
312
|
+
bannerAdStatusListener.mOnAdOpened += BannerAdStatusListener_mOnAdOpened;
|
|
313
|
+
bannerAdStatusListener.mOnAdFailed += BannerAdStatusListener_mOnAdFailed;
|
|
314
|
+
|
|
315
|
+
return bannerAdStatusListener;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
public void ShowBannerAd()
|
|
319
|
+
{
|
|
320
|
+
if (bannerView == null)
|
|
321
|
+
{
|
|
322
|
+
Debug.LogError($"{TAG} Banner Ad is Null.");
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
bannerView.ShowBanner();
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
public void HideBannerAd()
|
|
329
|
+
{
|
|
330
|
+
if (bannerView == null)
|
|
331
|
+
{
|
|
332
|
+
Debug.LogError($"{TAG} Banner Ad is Null.");
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
bannerView.HideBanner();
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
public void DestroyBannerAd()
|
|
339
|
+
{
|
|
340
|
+
if (bannerView == null)
|
|
341
|
+
{
|
|
342
|
+
Debug.LogError($"{TAG} Banner Ad is Null.");
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
bannerView.DestroyBanner();
|
|
346
|
+
_isBannerAdLoaded = false;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
public void SetBannerRefresh(long seconds)
|
|
350
|
+
{
|
|
351
|
+
if (bannerView != null)
|
|
352
|
+
{
|
|
353
|
+
bannerView.SetBannerRefresh(seconds);
|
|
354
|
+
}
|
|
355
|
+
else
|
|
356
|
+
{
|
|
357
|
+
Debug.LogError($"{TAG} BannerView not initialized yet.");
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
private bool _isBannerAdLoaded;
|
|
362
|
+
public bool IsBannerAdLoaded { get => _isBannerAdLoaded; set => _isBannerAdLoaded = value; }
|
|
363
|
+
|
|
364
|
+
public void AssignDefaultBannerAdLoad(AdLoadMethod type = AdLoadMethod.Default,
|
|
365
|
+
UnityBannerAdPositionCodeType position = UnityBannerAdPositionCodeType.POSITION_BOTTOM,
|
|
366
|
+
UnityBannerAdSizeType bannerSize = UnityBannerAdSizeType.BANNER_SIZE_320_50)
|
|
367
|
+
{
|
|
368
|
+
switch (type)
|
|
369
|
+
{
|
|
370
|
+
case AdLoadMethod.Default:
|
|
371
|
+
DefaultLoadBannerAd = (a, b) => LoadBannerAd(position, bannerSize.ToString());
|
|
372
|
+
break;
|
|
373
|
+
case AdLoadMethod.WithAdId:
|
|
374
|
+
var adId = "testw6vs28auh3";
|
|
375
|
+
DefaultLoadBannerAd = (a, b) => LoadBannerAd(adId, position, bannerSize.ToString());
|
|
376
|
+
break;
|
|
377
|
+
case AdLoadMethod.WithConfig:
|
|
378
|
+
Debug.LogError($"{TAG} AssignDefaultBannerAdLoad with config is not supported.");
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
#endregion
|
|
384
|
+
|
|
385
|
+
#region LISTENERS
|
|
386
|
+
|
|
387
|
+
public event Action OnBannerLoadEvent;
|
|
388
|
+
public event Action OnBannerFailedToLoadEvent;
|
|
389
|
+
|
|
390
|
+
private void BannerAdStatusListener_mOnAdFailed(object sender, AdLoadErrorCodeEventArgs e)
|
|
391
|
+
{
|
|
392
|
+
Debug.LogError($"{TAG} BannerAdLoadFailed. Error Code: " + e.ErrorCode);
|
|
393
|
+
OnBannerFailedToLoadEvent?.Invoke();
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
private void BannerAdStatusListener_mOnAdOpened(object sender, EventArgs e)
|
|
397
|
+
{
|
|
398
|
+
Debug.Log($"{TAG} BannerAdOpened : ");
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
private void BannerAdStatusListener_mOnAdClicked(object sender, EventArgs e)
|
|
402
|
+
{
|
|
403
|
+
Debug.Log($"{TAG} BannerAdClicked : ");
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
private void BannerAdStatusListener_mOnAdImpression(object sender, EventArgs e)
|
|
407
|
+
{
|
|
408
|
+
Debug.Log($"{TAG} BannerAdImpression : ");
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
private void BannerAdStatusListener_mOnAdClosed(object sender, EventArgs e)
|
|
412
|
+
{
|
|
413
|
+
Debug.Log($"{TAG} BannerAdClosed : ");
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
private void BannerAdStatusListener_mOnAdLoaded(object sender, EventArgs e)
|
|
417
|
+
{
|
|
418
|
+
Debug.Log($"{TAG} BannerAdLoadSuccess : ");
|
|
419
|
+
_isBannerAdLoaded = true;
|
|
420
|
+
OnBannerLoadEvent?.Invoke();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
#endregion
|
|
424
|
+
|
|
425
|
+
#endregion
|
|
426
|
+
|
|
427
|
+
#region INTERSTITIAL
|
|
428
|
+
|
|
429
|
+
#region PUBLIC METHODS
|
|
430
|
+
|
|
431
|
+
public void LoadInterstitialAd()
|
|
432
|
+
{
|
|
433
|
+
if (!isInitialized )//|| !adsKitSettings.GetBool(HMSAdsKitSettings.EnableInterstitialAd))
|
|
434
|
+
{
|
|
435
|
+
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
Debug.Log($"{TAG} Loading Interstitial Ad.");
|
|
439
|
+
interstitialView = new InterstitialAd
|
|
440
|
+
{
|
|
441
|
+
AdId = TestInterstitialAdId,// adsKitSettings.GetBool(HMSAdsKitSettings.UseTestAds) ? TestInterstitialAdId : adsKitSettings.Get(HMSAdsKitSettings.InterstitialAdID),
|
|
442
|
+
AdListener = new InterstitialAdListener(this)
|
|
443
|
+
};
|
|
444
|
+
interstitialView.LoadAd(new AdParam.Builder().Build());
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
public void LoadInterstitialAd(string adId)
|
|
448
|
+
{
|
|
449
|
+
if (!isInitialized || !adsKitSettings.GetBool(HMSAdsKitSettings.EnableInterstitialAd)) return;
|
|
450
|
+
Debug.Log($"{TAG} Loading Interstitial Ad.");
|
|
451
|
+
interstitialView = new InterstitialAd
|
|
452
|
+
{
|
|
453
|
+
AdId = adId,
|
|
454
|
+
AdListener = new InterstitialAdListener(this)
|
|
455
|
+
};
|
|
456
|
+
interstitialView.LoadAd(new AdParam.Builder().Build());
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
public void ShowInterstitialAd()
|
|
460
|
+
{
|
|
461
|
+
Debug.Log($"{TAG} ShowInterstitialAd called");
|
|
462
|
+
if (interstitialView?.Loaded == true)
|
|
463
|
+
{
|
|
464
|
+
Debug.Log($"{TAG} Showing Interstitial Ad");
|
|
465
|
+
interstitialView.Show();
|
|
466
|
+
}
|
|
467
|
+
else
|
|
468
|
+
Debug.LogError($"{TAG} Interstitial Ad Still Not Loaded Yet!");
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
public bool IsInterstitialAdLoaded
|
|
472
|
+
{
|
|
473
|
+
get
|
|
474
|
+
{
|
|
475
|
+
if (interstitialView == null)
|
|
476
|
+
return false;
|
|
477
|
+
return interstitialView.Loaded;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
public void AssignDefaultInterstitialAdLoad(AdLoadMethod type = AdLoadMethod.Default)
|
|
482
|
+
{
|
|
483
|
+
switch (type)
|
|
484
|
+
{
|
|
485
|
+
case AdLoadMethod.Default:
|
|
486
|
+
DefaultLoadInterstitialAd = LoadInterstitialAd;
|
|
487
|
+
break;
|
|
488
|
+
case AdLoadMethod.WithAdId:
|
|
489
|
+
var adId = "testb4znbuh3n2";
|
|
490
|
+
DefaultLoadInterstitialAd = () => LoadInterstitialAd(adId);
|
|
491
|
+
break;
|
|
492
|
+
case AdLoadMethod.WithConfig:
|
|
493
|
+
Debug.LogError($"{TAG} AssignDefaultInterstitialAdLoad with config is not supported.");
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
#endregion
|
|
498
|
+
|
|
499
|
+
#region LISTENERS
|
|
500
|
+
private class InterstitialAdListener : IAdListener
|
|
501
|
+
{
|
|
502
|
+
private const string TAG = "[HMS] HMSAdsKitManager";
|
|
503
|
+
private readonly HMSAdsKitManager mAdsManager;
|
|
504
|
+
public InterstitialAdListener(HMSAdsKitManager adsManager)
|
|
505
|
+
{
|
|
506
|
+
mAdsManager = adsManager;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
public void OnAdClicked()
|
|
510
|
+
{
|
|
511
|
+
Debug.Log($"{TAG} OnInterstitialAdClicked");
|
|
512
|
+
mAdsManager.OnInterstitialAdClicked?.Invoke();
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
public void OnAdClosed()
|
|
516
|
+
{
|
|
517
|
+
Debug.Log($"{TAG} OnInterstitialAdClosed");
|
|
518
|
+
mAdsManager.OnInterstitialAdClosed?.Invoke();
|
|
519
|
+
mAdsManager.DefaultLoadInterstitialAd?.Invoke();
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
public void OnAdFailed(int reason)
|
|
523
|
+
{
|
|
524
|
+
HMSExceptionHandler.Instance.HandleLogForListener($"{TAG} OnInterstitialAdFailed with error ${reason}", string.Empty, LogType.Error);
|
|
525
|
+
mAdsManager.OnInterstitialAdFailed?.Invoke(reason);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
public void OnAdImpression()
|
|
529
|
+
{
|
|
530
|
+
Debug.Log($"{TAG} OnInterstitialAdImpression");
|
|
531
|
+
mAdsManager.OnInterstitialAdImpression?.Invoke();
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
public void OnAdLeave()
|
|
535
|
+
{
|
|
536
|
+
Debug.Log($"{TAG} OnInterstitialAdLeave");
|
|
537
|
+
mAdsManager.OnInterstitialAdLeave?.Invoke();
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
public void OnAdLoaded()
|
|
541
|
+
{
|
|
542
|
+
Debug.Log($"{TAG} OnInterstitialAdLoaded");
|
|
543
|
+
mAdsManager.OnInterstitialAdLoaded?.Invoke();
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
public void OnAdOpened()
|
|
547
|
+
{
|
|
548
|
+
Debug.Log($"{TAG} OnInterstitialAdOpened");
|
|
549
|
+
mAdsManager.OnInterstitialAdOpened?.Invoke();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
public Action OnInterstitialAdClicked { get; set; }
|
|
554
|
+
public Action OnInterstitialAdClosed { get; set; }
|
|
555
|
+
public Action<int> OnInterstitialAdFailed { get; set; }
|
|
556
|
+
public Action OnInterstitialAdImpression { get; set; }
|
|
557
|
+
public Action OnInterstitialAdLeave { get; set; }
|
|
558
|
+
public Action OnInterstitialAdLoaded { get; set; }
|
|
559
|
+
public Action OnInterstitialAdOpened { get; set; }
|
|
560
|
+
|
|
561
|
+
#endregion
|
|
562
|
+
|
|
563
|
+
#endregion
|
|
564
|
+
|
|
565
|
+
#region REWARDED
|
|
566
|
+
|
|
567
|
+
private bool isInitializedRewarded => !isInitialized || !adsKitSettings.GetBool(HMSAdsKitSettings.EnableRewardedAd);
|
|
568
|
+
|
|
569
|
+
#region PUBLIC METHODS
|
|
570
|
+
public void LoadRewardedAd()
|
|
571
|
+
{
|
|
572
|
+
if (isInitializedRewarded) return;
|
|
573
|
+
Debug.Log($"{TAG} LoadRewardedAd with test ad enabled : {adsKitSettings.GetBool(HMSAdsKitSettings.UseTestAds)}");
|
|
574
|
+
rewardedView = new RewardAd(adsKitSettings.GetBool(HMSAdsKitSettings.UseTestAds) ? TestRewardedAdId : adsKitSettings.Get(HMSAdsKitSettings.RewardedAdID));
|
|
575
|
+
rewardedView.RewardAdListener = new RewardAdListener(this);
|
|
576
|
+
rewardedView.LoadAd(new AdParam.Builder().Build());
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
public void LoadRewardedAd(string adId)
|
|
580
|
+
{
|
|
581
|
+
if (isInitializedRewarded) return;
|
|
582
|
+
Debug.Log($"{TAG} LoadRewardedAd with adId");
|
|
583
|
+
rewardedView = new RewardAd(adId);
|
|
584
|
+
rewardedView.RewardAdListener = new RewardAdListener(this);
|
|
585
|
+
rewardedView.LoadAd(new AdParam.Builder().Build());
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
public void LoadRewardedAd(RewardVerifyConfig config)
|
|
589
|
+
{
|
|
590
|
+
if (isInitializedRewarded) return;
|
|
591
|
+
Debug.Log($"{TAG} LoadRewardedAd with verify config");
|
|
592
|
+
rewardedView = new RewardAd(adsKitSettings.GetBool(HMSAdsKitSettings.UseTestAds) ? TestRewardedAdId : adsKitSettings.Get(HMSAdsKitSettings.RewardedAdID));
|
|
593
|
+
rewardedView.SetUserId(config.UserId);
|
|
594
|
+
rewardedView.SetData(config.Data);
|
|
595
|
+
SetRewardVerifyConfig(config);
|
|
596
|
+
rewardedView.RewardAdListener = new RewardAdListener(this);
|
|
597
|
+
rewardedView.LoadAd(new AdParam.Builder().Build());
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
public void ShowRewardedAd()
|
|
601
|
+
{
|
|
602
|
+
Debug.Log($"{TAG} ShowRewardedAd called");
|
|
603
|
+
if (rewardedView?.Loaded == true)
|
|
604
|
+
{
|
|
605
|
+
Debug.Log($"{TAG} Showing Rewarded Ad");
|
|
606
|
+
rewardedView.Show();
|
|
607
|
+
}
|
|
608
|
+
else
|
|
609
|
+
{
|
|
610
|
+
Debug.LogError($"{TAG} Rewarded Ad still not loaded");
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
public void SetRewardVerifyConfig(RewardVerifyConfig config)
|
|
615
|
+
{
|
|
616
|
+
Debug.Log($"{TAG} SetRewardVerifyConfig called");
|
|
617
|
+
if (rewardedView?.Loaded == true)
|
|
618
|
+
{
|
|
619
|
+
Debug.Log($"{TAG} SetRewardVerifyConfig. User Id: {config.UserId} Data: {config.Data}");
|
|
620
|
+
rewardedView.SetRewardVerifyConfig(config);
|
|
621
|
+
}
|
|
622
|
+
else
|
|
623
|
+
{
|
|
624
|
+
Debug.LogError($"{TAG} Rewarded Ad still not loaded");
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
public bool IsRewardedAdLoaded
|
|
629
|
+
{
|
|
630
|
+
get
|
|
631
|
+
{
|
|
632
|
+
if (rewardedView == null)
|
|
633
|
+
return false;
|
|
634
|
+
return rewardedView.Loaded;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
public void AssignDefaultLoadRewardAd(AdLoadMethod type = AdLoadMethod.Default)
|
|
638
|
+
{
|
|
639
|
+
switch (type)
|
|
640
|
+
{
|
|
641
|
+
case AdLoadMethod.Default:
|
|
642
|
+
DefaultLoadRewardAd = LoadRewardedAd;
|
|
643
|
+
break;
|
|
644
|
+
case AdLoadMethod.WithAdId:
|
|
645
|
+
var adId = "testx9dtjwj8hp";
|
|
646
|
+
DefaultLoadRewardAd = () => LoadRewardedAd(adId);
|
|
647
|
+
break;
|
|
648
|
+
case AdLoadMethod.WithConfig:
|
|
649
|
+
DefaultLoadRewardAd = () => LoadRewardedAd(rewardVerifyConfig);
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
#endregion
|
|
655
|
+
|
|
656
|
+
#region LISTENERS
|
|
657
|
+
|
|
658
|
+
private class RewardAdListener : IRewardAdListener
|
|
659
|
+
{
|
|
660
|
+
private const string TAG = "[HMS] HMSAdsKitManager";
|
|
661
|
+
private readonly HMSAdsKitManager mAdsManager;
|
|
662
|
+
|
|
663
|
+
public RewardAdListener(HMSAdsKitManager adsManager)
|
|
664
|
+
{
|
|
665
|
+
mAdsManager = adsManager;
|
|
666
|
+
}
|
|
667
|
+
public void OnRewardAdClosed()
|
|
668
|
+
{
|
|
669
|
+
Debug.Log($"{TAG} OnRewardAdClosed");
|
|
670
|
+
mAdsManager.OnRewardAdClosed?.Invoke();
|
|
671
|
+
mAdsManager.DefaultLoadRewardAd?.Invoke();
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
public void OnRewardAdCompleted()
|
|
675
|
+
{
|
|
676
|
+
Debug.Log($"{TAG} OnRewardAdCompleted!");
|
|
677
|
+
mAdsManager.OnRewardAdCompleted?.Invoke();
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
public void OnRewardAdFailedToLoad(int errorCode)
|
|
681
|
+
{
|
|
682
|
+
HMSExceptionHandler.Instance.HandleLogForListener($"{TAG} OnRewardAdFailedToLoad with error ${errorCode}", string.Empty, LogType.Error);
|
|
683
|
+
mAdsManager.OnRewardedAdFailedToLoad?.Invoke(errorCode);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
public void OnRewardAdLeftApp()
|
|
687
|
+
{
|
|
688
|
+
Debug.Log($"{TAG} OnRewardAdLeftApp!");
|
|
689
|
+
mAdsManager.OnRewardAdLeftApp?.Invoke();
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
public void OnRewardAdLoaded()
|
|
693
|
+
{
|
|
694
|
+
Debug.Log($"{TAG} Rewarded ad loaded!");
|
|
695
|
+
mAdsManager.OnRewardedAdLoaded?.Invoke();
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
public void OnRewardAdOpened()
|
|
699
|
+
{
|
|
700
|
+
Debug.Log($"{TAG} OnRewardAdOpened");
|
|
701
|
+
mAdsManager.OnRewardAdOpened?.Invoke();
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
public void OnRewardAdStarted()
|
|
705
|
+
{
|
|
706
|
+
Debug.Log($"{TAG} OnRewardAdStarted!");
|
|
707
|
+
mAdsManager.OnRewardAdStarted?.Invoke();
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
public void OnRewarded(Reward reward)
|
|
711
|
+
{
|
|
712
|
+
Debug.Log($"{TAG} OnRewarded " + reward);
|
|
713
|
+
mAdsManager.OnRewarded?.Invoke(reward);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
public Action OnRewardAdClosed { get; set; }
|
|
718
|
+
public Action OnRewardAdLeftApp { get; set; }
|
|
719
|
+
public Action OnRewardAdStarted { get; set; }
|
|
720
|
+
public Action OnRewardAdOpened { get; set; }
|
|
721
|
+
public Action OnRewardAdCompleted { get; set; }
|
|
722
|
+
public Action<Reward> OnRewarded { get; set; }
|
|
723
|
+
public Action OnRewardedAdLoaded { get; set; }
|
|
724
|
+
public Action<int> OnRewardedAdFailedToLoad { get; set; }
|
|
725
|
+
|
|
726
|
+
#endregion
|
|
727
|
+
|
|
728
|
+
#endregion
|
|
729
|
+
|
|
730
|
+
#region SPLASH
|
|
731
|
+
|
|
732
|
+
#region PUBLIC METHODS
|
|
733
|
+
|
|
734
|
+
public void LoadSplashAd()
|
|
735
|
+
{
|
|
736
|
+
string adId = adsKitSettings.GetBool(HMSAdsKitSettings.UseTestAds) ? TestSplashImageAdId : adsKitSettings.Get(HMSAdsKitSettings.SplashAdID);
|
|
737
|
+
if (!Enum.TryParse(adsKitSettings.Get(HMSAdsKitSettings.SplashOrientation, "PORTRAIT"), out SplashAdOrientation orientation))
|
|
738
|
+
{
|
|
739
|
+
orientation = SplashAdOrientation.PORTRAIT;
|
|
740
|
+
}
|
|
741
|
+
LoadSplashAd(adId, orientation);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
public void LoadSplashAd(string adId, SplashAdOrientation orientation)
|
|
745
|
+
{
|
|
746
|
+
if (!isInitialized || !adsKitSettings.GetBool(HMSAdsKitSettings.EnableSplashAd)) return;
|
|
747
|
+
Debug.Log($"{TAG} Loading Splash Ad.");
|
|
748
|
+
splashView = new SplashAd
|
|
749
|
+
{
|
|
750
|
+
AdId = adId,
|
|
751
|
+
Orientation = orientation,
|
|
752
|
+
Title = string.IsNullOrEmpty(adsKitSettings.Get(HMSAdsKitSettings.SplashTitle))
|
|
753
|
+
? "Splash Title"
|
|
754
|
+
: adsKitSettings.Get(HMSAdsKitSettings.SplashTitle),
|
|
755
|
+
SubText = string.IsNullOrEmpty(adsKitSettings.Get(HMSAdsKitSettings.SplashSubText))
|
|
756
|
+
? "Splash SubText"
|
|
757
|
+
: adsKitSettings.Get(HMSAdsKitSettings.SplashSubText)
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
Texture2D texture = new Texture2D(28, 28);
|
|
761
|
+
texture.LoadImage(Convert.FromBase64String(adsKitSettings.Get(HMSAdsKitSettings.SplashImageBytes) ?? DefaultIcon));
|
|
762
|
+
splashView.Icon = texture;
|
|
763
|
+
|
|
764
|
+
splashView.SetSplashAdDisplayListener(new SplashAdDisplayListener(
|
|
765
|
+
SplashAdStatusListener_OnAdShowed,
|
|
766
|
+
SplashAdStatusListener_OnAdClicked));
|
|
767
|
+
|
|
768
|
+
splashView.SetSplashAdLoadListener(new SplashAdLoadListener(
|
|
769
|
+
SplashAdStatusListener_OnAdDismissed,
|
|
770
|
+
SplashAdStatusListener_OnAdFailedToLoad,
|
|
771
|
+
SplashAdStatusListener_OnAdLoaded));
|
|
772
|
+
|
|
773
|
+
splashView.LoadAd(new AdParam.Builder().Build());
|
|
774
|
+
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
public void AssignDefaultSplashAdLoad(AdLoadMethod type = AdLoadMethod.Default)
|
|
778
|
+
{
|
|
779
|
+
switch (type)
|
|
780
|
+
{
|
|
781
|
+
case AdLoadMethod.Default:
|
|
782
|
+
DefaultLoadSplashAd = LoadSplashAd;
|
|
783
|
+
break;
|
|
784
|
+
case AdLoadMethod.WithAdId:
|
|
785
|
+
var adId = "testq6zq98hecj";
|
|
786
|
+
DefaultLoadSplashAd = () => LoadSplashAd(adId, SplashAdOrientation.PORTRAIT);
|
|
787
|
+
break;
|
|
788
|
+
case AdLoadMethod.WithConfig:
|
|
789
|
+
Debug.LogError($"{TAG} AssignDefaultSplashAdLoad with config is not supported.");
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
#endregion
|
|
794
|
+
|
|
795
|
+
#region LISTENERS
|
|
796
|
+
|
|
797
|
+
public event Action OnSplashAdDismissed;
|
|
798
|
+
public event Action<int> OnSplashAdFailedToLoad;
|
|
799
|
+
public event Action OnSplashAdLoaded;
|
|
800
|
+
public event Action OnSplashAdClicked;
|
|
801
|
+
public event Action OnSplashAdShowed;
|
|
802
|
+
|
|
803
|
+
private void SplashAdStatusListener_OnAdDismissed()
|
|
804
|
+
{
|
|
805
|
+
Debug.Log($"{TAG} SplashAdDismissed.");
|
|
806
|
+
OnSplashAdDismissed?.Invoke();
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
private void SplashAdStatusListener_OnAdFailedToLoad(int errorCode)
|
|
810
|
+
{
|
|
811
|
+
HMSExceptionHandler.Instance.HandleLogForListener($"{TAG} SplashAdLoadFailed. Error Code: " + errorCode, string.Empty, LogType.Error);
|
|
812
|
+
OnSplashAdFailedToLoad?.Invoke(errorCode);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
private void SplashAdStatusListener_OnAdLoaded()
|
|
816
|
+
{
|
|
817
|
+
Debug.Log($"{TAG} SplashAdLoaded.");
|
|
818
|
+
OnSplashAdLoaded?.Invoke();
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
private void SplashAdStatusListener_OnAdClicked()
|
|
822
|
+
{
|
|
823
|
+
Debug.Log($"{TAG} SplashAdClicked.");
|
|
824
|
+
OnSplashAdClicked?.Invoke();
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
private void SplashAdStatusListener_OnAdShowed()
|
|
828
|
+
{
|
|
829
|
+
Debug.Log($"{TAG} SplashAdShowed.");
|
|
830
|
+
OnSplashAdShowed?.Invoke();
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
#endregion
|
|
834
|
+
|
|
835
|
+
#endregion
|
|
836
|
+
|
|
837
|
+
#region CONSENT
|
|
838
|
+
|
|
839
|
+
#region PUBLIC METHODS
|
|
840
|
+
|
|
841
|
+
public void AddTestDeviceId(string testDeviceId)
|
|
842
|
+
{
|
|
843
|
+
Consent consent = Consent.GetInstance();
|
|
844
|
+
consent.AddTestDeviceId(testDeviceId);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
public string GetTestDeviceId()
|
|
848
|
+
{
|
|
849
|
+
Consent consent = Consent.GetInstance();
|
|
850
|
+
return consent.TestDeviceId;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
public void RequestConsentUpdate()
|
|
854
|
+
{
|
|
855
|
+
Consent consent = Consent.GetInstance();
|
|
856
|
+
consent.RequestConsentUpdate(new ConsentUpdateListener(this));
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
public void SetConsentStatus(ConsentStatus consentStatus)
|
|
860
|
+
{
|
|
861
|
+
Consent consent = Consent.GetInstance();
|
|
862
|
+
consent.SetConsentStatus(ConsentStatusWrapper.ForValue((int)consentStatus));
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
public void SetDebugNeedConsent(DebugNeedConsent debugNeedConsent)
|
|
866
|
+
{
|
|
867
|
+
Consent consent = Consent.GetInstance();
|
|
868
|
+
consent.SetDebugNeedConsent(DebugNeedConsentWrapper.ForValue((int)debugNeedConsent));
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
public void SetUnderAgeOfPromise(bool underAgeOfPromise)
|
|
872
|
+
{
|
|
873
|
+
Consent consent = Consent.GetInstance();
|
|
874
|
+
consent.SetUnderAgeOfPromise(underAgeOfPromise);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
#endregion
|
|
878
|
+
|
|
879
|
+
#region LISTENERS
|
|
880
|
+
|
|
881
|
+
private class ConsentUpdateListener : IConsentUpdateListener
|
|
882
|
+
{
|
|
883
|
+
private readonly string TAG = "[HMS] HMSAdsKitManager";
|
|
884
|
+
|
|
885
|
+
private readonly HMSAdsKitManager mAdsManager;
|
|
886
|
+
|
|
887
|
+
public ConsentUpdateListener(HMSAdsKitManager adsManager)
|
|
888
|
+
{
|
|
889
|
+
mAdsManager = adsManager;
|
|
890
|
+
}
|
|
891
|
+
void IConsentUpdateListener.OnFail(string desc)
|
|
892
|
+
{
|
|
893
|
+
HMSExceptionHandler.Instance.HandleLogForListener($"{TAG} AdsKitManager CONSENT OnFail " + desc, string.Empty, LogType.Error);
|
|
894
|
+
|
|
895
|
+
if (mAdsManager != null)
|
|
896
|
+
{
|
|
897
|
+
mAdsManager.ConsentOnFail?.Invoke(desc);
|
|
898
|
+
}
|
|
899
|
+
else
|
|
900
|
+
{
|
|
901
|
+
Debug.LogWarning($"{TAG} Make sure to call RequestConsentUpdate First");
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
void IConsentUpdateListener.OnSuccess(ConsentStatus consentStatus, bool isNeedConsent, IList<AdProvider> adProviders)
|
|
907
|
+
{
|
|
908
|
+
Debug.Log($"{TAG} HMSAdsKitManager CONSENT OnSuccess consentStatus:{consentStatus} isNeedConsent:{isNeedConsent} adProviders listSize:{adProviders.Count}");
|
|
909
|
+
if (mAdsManager != null)
|
|
910
|
+
{
|
|
911
|
+
mAdsManager.ConsentOnSuccess?.Invoke(consentStatus, isNeedConsent, adProviders);
|
|
912
|
+
}
|
|
913
|
+
else
|
|
914
|
+
{
|
|
915
|
+
Debug.LogWarning($"{TAG} Make sure to call RequestConsentUpdate First");
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
public Action<string> ConsentOnFail { get; set; }
|
|
921
|
+
public Action<ConsentStatus, bool, IList<AdProvider>> ConsentOnSuccess { get; set; }
|
|
922
|
+
|
|
923
|
+
#endregion
|
|
924
|
+
|
|
925
|
+
#endregion
|
|
926
|
+
|
|
927
|
+
public class Builder
|
|
928
|
+
{
|
|
929
|
+
public bool HasPurchasedNoAds;
|
|
930
|
+
public RewardVerifyConfig rewardVerifyConfig;
|
|
931
|
+
public AdLoadMethod rewardedAdLoadMethod = AdLoadMethod.Default;
|
|
932
|
+
public AdLoadMethod bannerAdLoadMethod = AdLoadMethod.Default;
|
|
933
|
+
public AdLoadMethod interstitialAdLoadMethod = AdLoadMethod.Default;
|
|
934
|
+
public AdLoadMethod splashAdLoadMethod = AdLoadMethod.Default;
|
|
935
|
+
|
|
936
|
+
public Builder SetHasPurchasedNoAds(bool _hasPurchasedNoAds)
|
|
937
|
+
{
|
|
938
|
+
HasPurchasedNoAds = _hasPurchasedNoAds;
|
|
939
|
+
return this;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
public Builder SetRewardedAdLoadMethod(AdLoadMethod type, RewardVerifyConfig config = null)
|
|
943
|
+
{
|
|
944
|
+
rewardedAdLoadMethod = type;
|
|
945
|
+
if (config != null)
|
|
946
|
+
{
|
|
947
|
+
Debug.Log($"{TAG} SetRewardedAdLoadMethod with config {config.UserId} {config.Data}");
|
|
948
|
+
rewardVerifyConfig = config;
|
|
949
|
+
}
|
|
950
|
+
return this;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
public Builder SetBannerAdLoadMethod(AdLoadMethod type)
|
|
954
|
+
{
|
|
955
|
+
bannerAdLoadMethod = type;
|
|
956
|
+
return this;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
public Builder SetInterstitialAdLoadMethod(AdLoadMethod type)
|
|
960
|
+
{
|
|
961
|
+
interstitialAdLoadMethod = type;
|
|
962
|
+
return this;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
public Builder SetSplashAdLoadMethod(AdLoadMethod type)
|
|
966
|
+
{
|
|
967
|
+
splashAdLoadMethod = type;
|
|
968
|
+
return this;
|
|
969
|
+
}
|
|
970
|
+
public HMSAdsKitManager Build()
|
|
971
|
+
{
|
|
972
|
+
return new HMSAdsKitManager(this);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
}
|