From bd01d675c2249f8911c5819beb142e6b9088ae7c Mon Sep 17 00:00:00 2001 From: Mansi Pandya Date: Fri, 11 Oct 2024 15:03:27 -0400 Subject: [PATCH 1/2] feat: Update to Partner Latest version 7.0.2 --- build.gradle | 2 +- .../kotlin/com/mparticle/kits/CleverTapKit.kt | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 651b5b3..7c3f70a 100644 --- a/build.gradle +++ b/build.gradle @@ -42,5 +42,5 @@ android { dependencies { implementation 'androidx.legacy:legacy-support-v4:1.0.0' - api 'com.clevertap.android:clevertap-android-sdk:6.2.1' + api 'com.clevertap.android:clevertap-android-sdk:7.0.2' } diff --git a/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt b/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt index b3beb5f..aea3be2 100644 --- a/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt +++ b/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt @@ -47,16 +47,18 @@ class CleverTapKit : KitIntegration(), UserAttributeListener, CommerceListener, */ private fun updateIntegrationAttributes() { cleverTapInstance?.let { - val cleverTapID = it.cleverTapAttributionIdentifier - if (!KitUtils.isEmpty(cleverTapID)) { - val integrationAttributes = HashMap(1) - integrationAttributes[CLEVERTAPID_INTEGRATION_KEY] = cleverTapID - } else { - if (handler == null) { - handler = Handler() + it.getCleverTapID { id -> + if (!KitUtils.isEmpty(id)) { + val integrationAttributes = HashMap(1) + integrationAttributes[CLEVERTAPID_INTEGRATION_KEY] = id + } else { + if (handler == null) { + handler = Handler() + } + handler?.postDelayed({ updateIntegrationAttributes() }, 500) } - handler?.postDelayed({ updateIntegrationAttributes() }, 500) } + } } From 01d7a206401b25ad49de6edc5f56af0d8a113a2d Mon Sep 17 00:00:00 2001 From: Mansi Pandya Date: Fri, 11 Oct 2024 15:07:08 -0400 Subject: [PATCH 2/2] Removed extra space --- src/main/kotlin/com/mparticle/kits/CleverTapKit.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt b/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt index aea3be2..daf7fb5 100644 --- a/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt +++ b/src/main/kotlin/com/mparticle/kits/CleverTapKit.kt @@ -58,7 +58,6 @@ class CleverTapKit : KitIntegration(), UserAttributeListener, CommerceListener, handler?.postDelayed({ updateIntegrationAttributes() }, 500) } } - } }