Skip to content

Commit

Permalink
Merge pull request #348 from CleverTap/develop
Browse files Browse the repository at this point in the history
Release # 4.6.5
  • Loading branch information
root-ansh-ct authored Oct 21, 2022
2 parents 2aace89 + d0dbd39 commit 7563c36
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## CHANGE LOG.

### October 21, 2022
* [CleverTap Android SDK v4.6.5](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)


### October 10, 2022
* [CleverTap Android SDK v4.6.4](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)
* [CleverTap Xiaomi Push SDK v1.5.1](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTXIAOMIPUSHCHANGELOG.md)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ We publish the SDK to `mavenCentral` as an `AAR` file. Just declare it as depend

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:4.6.4"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.5"
}
```

Alternatively, you can download and add the AAR file included in this repo in your Module libs directory and tell gradle to install it like this:

```groovy
dependencies {
implementation (name: "clevertap-android-sdk-4.6.4", ext: 'aar')
implementation (name: "clevertap-android-sdk-4.6.5", ext: 'aar')
}
```

Expand All @@ -46,7 +46,7 @@ Add the Firebase Messaging library and Android Support Library v4 as dependencie

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:4.6.4"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.5"
implementation "androidx.core:core:1.3.0"
implementation "com.google.firebase:firebase-messaging:21.0.0"
implementation "com.google.android.gms:play-services-ads:19.4.0" // Required only if you enable Google ADID collection in the SDK (turned off by default).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ public static boolean validateCTID(String cleverTapID) {
Logger.i("Custom CleverTap ID passed is greater than 64 characters. ");
return false;
}
if (!cleverTapID.matches("[A-Za-z0-9()!:$@_-]*")) {
Logger.i("Custom CleverTap ID cannot contain special characters apart from :,(,),_,!,@,$ and - ");
if (!cleverTapID.matches("[=|<>;+.A-Za-z0-9()!:$@_-]*")) {
Logger.i("Custom CleverTap ID cannot contain special characters apart from : =,(,),_,!,@,$,|<,>,;,+,. and - ");
return false;
}
return true;
Expand Down
44 changes: 29 additions & 15 deletions clevertap-core/src/test/java/com/clevertap/android/sdk/UtilsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class UtilsTest : BaseTestCase() {

@Test
fun test_drawableToBitmap_when_PassedDrawable_should_ReturnBitmap() {
val drawable: Drawable = application.getDrawable(R1.drawable.common_full_open_on_phone) ?: error("drawable is null")
val drawable: Drawable = application.getDrawable(R1.drawable.ct_image) ?: error("drawable is null")
val bitmap = Utils.drawableToBitmap(drawable)
printBitmapInfo(bitmap)
assertNotNull(bitmap)
Expand Down Expand Up @@ -677,20 +677,34 @@ class UtilsTest : BaseTestCase() {

@Test
fun test_validateCTID_when_CTIdIsPassed_should_ReturnTrueOrFalse() {
val id1 = null
assertFalse { Utils.validateCTID(id1) }

val id2 = ""
assertFalse { Utils.validateCTID(id2) }

val id3 = "11111111_22222222_33333333_44444444_55555555_66666666_77777777_88888888"
assertFalse { Utils.validateCTID(id3) }

val id4 = "1 2 3 4"
assertFalse { Utils.validateCTID(id4) }

val id5 = "abcd_1234_!!_::_$" + "@@_---"
assertTrue { Utils.validateCTID(id5) }
//invalid ids :
listOf(
null,
"",
" ",
"1111111122222222333333334444444455555555666666667777777788888888"+"___morethan64_chars",
"a 2 b c",
"//\\\\"
).forEach {
val isValid = Utils.validateCTID(it)
println("following string is ${if(isValid)"valid " else "invalid"} | '$it'")
assertFalse { isValid}
}
// valid ids :
listOf(
"1111111122222222333333334444444455555555666666667777777788888888",
("abcd_1234_!!_::_$" + "@@_---.|<>;+="),
"......",
"|||||||",
"<<<<____>>>>>",
";;;;;;;;;;;;;",
"++++++++++++",
"====",
).forEach {
val isValid = Utils.validateCTID(it)
println("following string is ${if(isValid)"valid " else "invalid"} | '$it'")
assertTrue { isValid}
}
}

@Test
Expand Down
3 changes: 3 additions & 0 deletions docs/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## CleverTap Android SDK CHANGE LOG

### Version 4.6.5 (October 21, 2022)
* Allows more special characters when setting custom CleverTap ID

### Version 4.6.4 (October 11, 2022)
* Bug fixes and improvements

Expand Down
2 changes: 1 addition & 1 deletion docs/CTGEOFENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Add the following dependencies to the `build.gradle`

```Groovy
implementation "com.clevertap.android:clevertap-geofence-sdk:1.1.0"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.4" // 3.9.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:4.6.5" // 3.9.0 and above
implementation "com.google.android.gms:play-services-location:18.0.0"
implementation "androidx.work:work-runtime:2.7.0" // required for FETCH_LAST_LOCATION_PERIODIC
implementation "androidx.concurrent:concurrent-futures:1.1.0" // required for FETCH_LAST_LOCATION_PERIODIC
Expand Down
2 changes: 1 addition & 1 deletion docs/CTPUSHTEMPLATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CleverTap Push Templates SDK helps you engage with your users using fancy push n

```groovy
implementation "com.clevertap.android:push-templates:1.0.5"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.4" // 4.4.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:4.6.5" // 4.4.0 and above
```

2. Add the following line to your Application class before the `onCreate()`
Expand Down
3 changes: 3 additions & 0 deletions templates/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## CleverTap Android SDK CHANGE LOG

### Version 4.6.5 (October 21, 2022)
* Allows more special characters when setting custom CleverTap ID

### Version 4.6.4 (October 11, 2022)
* Bug fixes and improvements

Expand Down
2 changes: 1 addition & 1 deletion versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ version.com.android.installreferrer..installreferrer=2.2
version.com.android.tools.lint..lint-api=27.0.1
version.com.android.tools.lint..lint-checks=27.0.1

version.com.clevertap.android..clevertap-android-sdk=4.6.4
version.com.clevertap.android..clevertap-android-sdk=4.6.5
version.com.clevertap.android..clevertap-geofence-sdk=1.1.0
version.com.clevertap.android..clevertap-hms-sdk=1.3.1
version.com.clevertap.android..clevertap-xiaomi-sdk=1.5.1
Expand Down

0 comments on commit 7563c36

Please sign in to comment.