Skip to main content

Upgrading from 2.3.x to 2.4.0

Important
Helpshift’s Legacy SDKs (SDK Version <=7.x.x) reached their end of life on 31 Dec 2022, and end of support on 31 March 2023. Please upgrade to the Latest SDKif you haven't already.

Upgrading from 2.3.x to 2.4.0

The Helpshift SDK v2.4.0 is a major update and we have deprecated some APIs. If you have questions or feedback, please Contact Us

List of deprecated APIs

Deprecated APINew API
HelpshiftApi.HelpshiftSupport IsConversationActiveHelpshiftApi.HelpshiftSupport CheckIfConversationActive
HelpshiftApi.HelpshiftSupport GetNotificationCountHelpshiftApi.HelpshiftSupport RequestUnreadMessagesCount
Helpshift Delegate API "DidReceiveNotificationCount"Helpshift delegate API "DidReceiveUnreadMessagesCount"

Check active Conversation

On SDK version 2.3.1 or below, you can check if an active conversation exists as shown below:

HelpshiftApi.HelpshiftSupport.IsConversationActive();

Starting from SDK version 2.4.0, a new api and a delegate method is introduced to check if an active conversation exists.

The example code is shown below:

HelpshiftApi.HelpshiftSupport.CheckIfConversationActive();

Implement the delegate interface method DidCheckIfConversationActive

public class  HSDelegate : InternalHsApiDefinition.HelpshiftSupportDelegate {

.
.
.
.
.
.

public void DidCheckIfConversationActive(bool isActive) {
// your code here
}
}

For more information, see Check Active Conversation

Show count of unread messages saved locally

On SDK version 2.3.1 or below, unread messages count can be obtained both synchronously and asynchronously. This is changed in SDK version 2.4.0 and unread message count is always obtained asynchronously.

As an example, if you want to get the locally saved unread messages count and you're on SDK 2.3.1 or earlier versions, you would use code like shown below:

HelpshiftApi.HelpshiftSupport.GetNotificationCount(false);

Starting from SDK version 2.4.0, you can retrieve the locally stored unread messages count as shown below:

HelpshiftApi.HelpshiftSupport.RequestUnreadMessagesCount(false);

Implement the delegate interface method DidReceiveUnreadMessagesCount

public class  HSDelegate : InternalHsApiDefinition.HelpshiftSupportDelegate {

.
.
.
.
.
.

public void DidReceiveUnreadMessagesCount(int count) {
// your code here
}
}

For more information, see Notifications Count

Show count of unread messages from server

On SDK version 2.3.1 or below, unread messages count can be obtained both synchronously and asynchronously. This is changed in SDK version 2.4.0 and unread message count is always obtained asynchronously.

As an example, if you want to fetch the latest unread messages count from the server and you're on SDK 2.3.1 or earlier versions, you would use code like shown below:

HelpshiftApi.HelpshiftSupport.GetNotificationCount(true);

Starting from SDK version 2.4.0, you can retrieve the unread messages count from server as shown below:

HelpshiftApi.HelpshiftSupport.RequestUnreadMessagesCount(true);

Implement the delegate interface method DidReceiveUnreadMessagesCount

public class  HSDelegate : InternalHsApiDefinition.HelpshiftSupportDelegate {

.
.
.
.
.
.

public void DidReceiveUnreadMessagesCount(int count) {
// your code here
}
}

For more information, see Notifications Count