Skip to content

Commit

Permalink
feat: Update to Partner Latest version 7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle committed Oct 11, 2024
1 parent fc9a00d commit bd01d67
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
18 changes: 10 additions & 8 deletions src/main/kotlin/com/mparticle/kits/CleverTapKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String>(1)
integrationAttributes[CLEVERTAPID_INTEGRATION_KEY] = cleverTapID
} else {
if (handler == null) {
handler = Handler()
it.getCleverTapID { id ->
if (!KitUtils.isEmpty(id)) {
val integrationAttributes = HashMap<String, String>(1)
integrationAttributes[CLEVERTAPID_INTEGRATION_KEY] = id
} else {
if (handler == null) {
handler = Handler()
}
handler?.postDelayed({ updateIntegrationAttributes() }, 500)
}
handler?.postDelayed({ updateIntegrationAttributes() }, 500)
}

}
}

Expand Down

0 comments on commit bd01d67

Please sign in to comment.