Skip to content

Commit

Permalink
feat: Update to Partner Latest version 7.0.2 (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle authored Oct 15, 2024
1 parent fc9a00d commit 29ecb70
Show file tree
Hide file tree
Showing 2 changed files with 10 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'
}
17 changes: 9 additions & 8 deletions src/main/kotlin/com/mparticle/kits/CleverTapKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ 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 29ecb70

Please sign in to comment.