Skip to content

Commit

Permalink
Merge pull request #331 from CleverTap/develop
Browse files Browse the repository at this point in the history
Release 4.6.3
  • Loading branch information
root-ansh-ct authored Sep 20, 2022
2 parents 8bdca67 + 7c6b6e8 commit f19a3ca
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## CHANGE LOG.

### September 20, 2022
* [CleverTap Android SDK v4.6.3](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)
* Note: Kindly upgrade to version CleverTap Android SDK v4.6.3 and above if you face any issues with app inbox

### September 13, 2022
* [CleverTap Android SDK v4.6.2](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)
* [CleverTap Push Templates SDK v1.0.5](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTPUSHTEMPLATESCHANGELOG.md)
* Note: Kindly upgrade to version CleverTap Android SDK v4.6.3 and above if you face any issues with app inbox


### September 6, 2022
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.2"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.3"
}
```

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.2", ext: 'aar')
implementation (name: "clevertap-android-sdk-4.6.3", 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.2"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.3"
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 @@ -226,14 +226,38 @@ public void inboxDidInitialize() {

@Override
public void inboxMessagesDidUpdate() {
Logger.d("CTInboxActivity: called inboxMessagesDidUpdate");
if (inboxContentUpdatedListener != null) {
inboxContentUpdatedListener.inboxMessagesDidUpdate();
Logger.v("CTInboxActivity|inboxMessagesDidUpdate called");
try {
boolean isCUListenerAvailable = inboxContentUpdatedListener != null;
Logger.v("CTInboxActivity|inboxMessagesDidUpdate: inboxContentUpdatedListener available:" + isCUListenerAvailable);

boolean isUsingMultipleTabs = styleConfig.isUsingTabs();
Logger.v("CTInboxActivity|inboxMessagesDidUpdate: isUsingMultipleTabs : " + isUsingMultipleTabs);

if (isCUListenerAvailable) {
inboxContentUpdatedListener.inboxMessagesDidUpdate();
}
if (isUsingMultipleTabs) {
int position = viewPager.getCurrentItem();
CTInboxListViewFragment fragment = (CTInboxListViewFragment) inboxTabAdapter.getItem(position);
fragment.updateAdapterContent();
}
else {
List<Fragment> fragments = getSupportFragmentManager().getFragments();
String singleTabTag = getFragmentTag();
for (Fragment f : fragments) {
String currentFTag = f.getTag();
if (f instanceof CTInboxListViewFragment && currentFTag != null && currentFTag.equalsIgnoreCase(singleTabTag)) {
((CTInboxListViewFragment) f).updateAdapterContent();
}
}

}

} catch (Throwable t) {
Logger.i("Something Went Wrong", t);
}

int position = viewPager.getCurrentItem();
CTInboxListViewFragment fragment = (CTInboxListViewFragment) inboxTabAdapter.getItem(position);
fragment.updateAdapterContent();

}

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

### Version 4.6.3 (September 20, 2022)
* Fix crash in App inbox when No additional tabs are used .

### Version 4.6.2 (September 13, 2022)
* Support for exoplayer [`v2.17.1`](https://github.com/google/ExoPlayer/releases/tag/r2.17.1) . Note : this upgrade will result in minor ui changes for interstitial in app and inbox notifications that uses exoplayer
* Note: Kindly upgrade to version CleverTap Android SDK v4.6.3 and above if you face any issues with app inbox

### Version 4.6.1 (September 6, 2022)
* App inbox blue dot fix : This release fixes the bug where new entries in inbox would continue showing blue dot when scrolled up and down . expected behaviour is to stop showing blue dot after 2 seconds.
* App inbox onMessage Click Callback : user can now pass an `InboxMessageListener` in addition to `InboxMessageButtonListener` to receive inbox item click
* Note: Kindly upgrade to version CleverTap Android SDK v4.6.3 and above if you face any issues with app inbox

### Version 4.6.0 (August 4, 2022)
* Improved push synchronization for multiple push services
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.2" // 3.9.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:4.6.3" // 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.2" // 4.4.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:4.6.3" // 4.4.0 and above
```

2. Add the following line to your Application class before the `onCreate()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object HomeScreenModel {
"onUserLogin"
),
"INBOX" to listOf(
"Open Inbox", "Show Total Counts", "Show Unread Counts", "Get All Inbox Messages",
"Open Inbox(with tabs)","Open Inbox(without tabs)","Show Total Counts", "Show Unread Counts", "Get All Inbox Messages",
"Get Unread Messages", "Get InboxMessage by messageID", "Delete InboxMessage by messageID",
"Delete InboxMessage by Object", "Mark as read by messageID", "Mark as read by Object",
"Notification Viewed event for Message", "Notification Clicked event for Message"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class HomeScreenViewModel(private val cleverTapAPI: CleverTapAPI?) : ViewModel()
cleverTapAPI?.onUserLogin(newProfile)
}
"20" -> {
// Open Inbox
// Open Inbox(Customised, with tabs)
val inboxTabs =
arrayListOf("Promotions", "Offers", "Others")//Anything after the first 2 will be ignored
CTInboxStyleConfig().apply {
Expand All @@ -175,66 +175,83 @@ class HomeScreenViewModel(private val cleverTapAPI: CleverTapAPI?) : ViewModel()
cleverTapAPI?.showAppInbox(this) //Opens activity With Tabs
}
}
"21" -> println("Total inbox message count = ${cleverTapAPI?.inboxMessageCount}") // show total inbox message count
"22" -> println("Unread inbox message count = ${cleverTapAPI?.inboxMessageUnreadCount}") // show unread inbox message count
"23" -> // All inbox messages
"21" -> {
// Open Inbox(Customised, without tabs)
CTInboxStyleConfig().apply {
tabBackgroundColor = "#FF0000"
selectedTabIndicatorColor = "#0000FF"
selectedTabColor = "#000000"
unselectedTabColor = "#FFFFFF"
backButtonColor = "#FF0000"
navBarTitleColor = "#FF0000"
navBarTitle = "MY INBOX"
navBarColor = "#FFFFFF"
inboxBackgroundColor = "#00FF00"
cleverTapAPI?.showAppInbox(this) //Opens activity Without Tabs
}
}


"22" -> println("Total inbox message count = ${cleverTapAPI?.inboxMessageCount}") // show total inbox message count
"23" -> println("Unread inbox message count = ${cleverTapAPI?.inboxMessageUnreadCount}") // show unread inbox message count
"24" -> // All inbox messages
cleverTapAPI?.allInboxMessages?.forEach {
println("All inbox messages ID = ${it.messageId}")
}

"24" -> // All unread inbox messages
"25" -> // All unread inbox messages
cleverTapAPI?.unreadInboxMessages?.forEach {
println("All unread inbox messages ID = ${it.messageId}")
}
"25" -> {
"26" -> {
val firstMessageId = cleverTapAPI?.allInboxMessages?.firstOrNull()?.messageId
//Get message object belonging to the given message id only. Message id should be a String
firstMessageId?.also {
val inboxMessageForId = cleverTapAPI?.getInboxMessageForId(it)
println("inboxMessage For Id $it = ${inboxMessageForId?.data}")
} ?: println("inboxMessage Id is null")
}
"26" -> {
"27" -> {
val firstMessageId = cleverTapAPI?.allInboxMessages?.firstOrNull()?.messageId
//Delete message object belonging to the given message id only. Message id should be a String
firstMessageId?.also {
cleverTapAPI?.deleteInboxMessage(it)
println("Deleted inboxMessage For Id = $it")
} ?: println("inboxMessage Id is null")
}
"27" -> {
"28" -> {
val firstMessage = cleverTapAPI?.allInboxMessages?.firstOrNull()
//Delete message object belonging to the given CTInboxMessage.
firstMessage?.also {
cleverTapAPI?.deleteInboxMessage(it)
println("Deleted inboxMessage = ${it.messageId}")
} ?: println("inboxMessage is null")
}
"28" -> {
"29" -> {
val firstMessageId = cleverTapAPI?.unreadInboxMessages?.firstOrNull()?.messageId
//Mark Message as Read. Message id should be a String
firstMessageId?.also {
cleverTapAPI?.markReadInboxMessage(it)
println("Marked Message as Read For Id = $it")
} ?: println("inboxMessage Id is null")
}
"29" -> {
"210" -> {
val firstMessage = cleverTapAPI?.unreadInboxMessages?.firstOrNull()
//Mark message as Read. Message should object of CTInboxMessage
firstMessage?.also {
cleverTapAPI?.markReadInboxMessage(it)
println("Marked Message as Read = ${it.messageId}")
} ?: println("inboxMessage is null")
}
"210" -> {
"211" -> {
val firstMessageId = cleverTapAPI?.allInboxMessages?.firstOrNull()?.messageId
//Raise Notification Viewed event for Inbox Message. Message id should be a String
firstMessageId?.also {
cleverTapAPI?.pushInboxNotificationViewedEvent(it)
println("Raised Notification Viewed event For Id = $it")
} ?: println("inboxMessage Id is null")
}
"211" -> {
"212" -> {
val firstMessageId = cleverTapAPI?.allInboxMessages?.firstOrNull()?.messageId
//Raise Notification Clicked event for Inbox Message. Message id should be a String
firstMessageId?.also {
Expand Down
5 changes: 5 additions & 0 deletions templates/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
## CleverTap Android SDK CHANGE LOG

### Version 4.6.3 (September 20, 2022)
* Fix crash in App inbox when No additional tabs are used .

### Version 4.6.2 (September 13, 2022)
* Support for exoplayer [`v2.17.1`](https://github.com/google/ExoPlayer/releases/tag/r2.17.1) . Note : this upgrade will result in minor ui changes for interstitial in app and inbox notifications that uses exoplayer
* Note: Kindly upgrade to version CleverTap Android SDK v4.6.3 and above if you face any issues with app inbox

### Version 4.6.1 (September 6, 2022)
* App inbox blue dot fix : This release fixes the bug where new entries in inbox would continue showing blue dot when scrolled up and down . expected behaviour is to stop showing blue dot after 2 seconds.
* App inbox onMessage Click Callback : user can now pass an `InboxMessageListener` in addition to `InboxMessageButtonListener` to receive inbox item click
* Note: Kindly upgrade to version CleverTap Android SDK v4.6.3 and above if you face any issues with app inbox

### Version 4.6.0 (August 4, 2022)
* Improved push synchronization for multiple push services
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.2
version.com.clevertap.android..clevertap-android-sdk=4.6.3
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.0
Expand Down

0 comments on commit f19a3ca

Please sign in to comment.