From 0ce9cd41a4ff7f08ae5203a795581a376bf77513 Mon Sep 17 00:00:00 2001 From: Spirit Date: Sun, 3 Nov 2024 10:13:55 +0800 Subject: [PATCH] feat: apply the publisher ID and space ID for different variants --- sdkdemo/build.gradle.kts | 33 +++++++++++-------- .../ui/dashboard/DashboardFragment.java | 6 +++- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/sdkdemo/build.gradle.kts b/sdkdemo/build.gradle.kts index 553dd18..3f68eda 100644 --- a/sdkdemo/build.gradle.kts +++ b/sdkdemo/build.gradle.kts @@ -24,7 +24,8 @@ android { resValue("string", "inlineId", "fcc96b4975ff4357") resValue("string", "topBannerId", "590bab0f1b6a482f") resValue("string", "bottomBannerId", "843e0771ab4c4d9f") - resValue("string", "floatingId", "765c489949994641") + resValue("string", "floatingId", "75da160bd7164d62") + resValue("string", "app_name", "TenMaxMobileSDKDemo") } release { applicationIdSuffix = ".public" @@ -38,27 +39,31 @@ android { resValue("string", "inlineId", "fcc96b4975ff4357") resValue("string", "topBannerId", "590bab0f1b6a482f") resValue("string", "bottomBannerId", "843e0771ab4c4d9f") - resValue("string", "floatingId", "765c489949994641") + resValue("string", "floatingId", "75da160bd7164d62") + resValue("string", "app_name", "TenMaxMobileSDKDemo") } + // the following build types are internal use only, please do not use them create("cht") { initWith(getByName("debug")) applicationIdSuffix = ".cht" - manifestPlaceholders["publisherId"] = "0fe5b5e7c1" - resValue("string", "interstitialId", "3644ec9ebb0d4ed4") - resValue("string", "inlineId", "fcc96b4975ff4357") - resValue("string", "topBannerId", "590bab0f1b6a482f") - resValue("string", "bottomBannerId", "843e0771ab4c4d9f") - resValue("string", "floatingId", "765c489949994641") + manifestPlaceholders["publisherId"] = "7ac1ab497e" + resValue("string", "interstitialId", "aa098c5fdb3c42e8") + resValue("string", "inlineId", "53d7675c53c64de6") + resValue("string", "topBannerId", "aa7947ea8e104da3") + resValue("string", "bottomBannerId", "2b07703707354bd6") + resValue("string", "floatingId", "5417d8bf58b34bac") + resValue("string", "app_name", "TenMaxMobileSDKDemo (CHT)") } create("internal") { initWith(getByName("debug")) applicationIdSuffix = ".internal" - manifestPlaceholders["publisherId"] = "0fe5b5e7c1" - resValue("string", "interstitialId", "3644ec9ebb0d4ed4") - resValue("string", "inlineId", "fcc96b4975ff4357") - resValue("string", "topBannerId", "590bab0f1b6a482f") - resValue("string", "bottomBannerId", "843e0771ab4c4d9f") - resValue("string", "floatingId", "765c489949994641") + manifestPlaceholders["publisherId"] = "3a915e28ca" + resValue("string", "interstitialId", "cc43cdfb576f4ef1") + resValue("string", "inlineId", "537a62f3a29c4a18") + resValue("string", "topBannerId", "79eb94fa2a0c40db") + resValue("string", "bottomBannerId", "fd1cf37e2c064da8") + resValue("string", "floatingId", "77938353b6a04d78") + resValue("string", "app_name", "TenMaxMobileSDKDemo (Internal)") } } compileOptions { diff --git a/sdkdemo/src/main/java/io/tenmax/sdkdemo/ui/dashboard/DashboardFragment.java b/sdkdemo/src/main/java/io/tenmax/sdkdemo/ui/dashboard/DashboardFragment.java index c6b4a94..210268d 100644 --- a/sdkdemo/src/main/java/io/tenmax/sdkdemo/ui/dashboard/DashboardFragment.java +++ b/sdkdemo/src/main/java/io/tenmax/sdkdemo/ui/dashboard/DashboardFragment.java @@ -88,6 +88,10 @@ public void onResume() { public void onDestroyView() { super.onDestroyView(); binding = null; - cleanAd(this.presentingAd); + String type = getArguments().getString("spaceType"); + // the floating AD would clean up resource on close button pressed + if (!"floating".equals(type)) { + cleanAd(this.presentingAd); + } } }