Upgrading from 1.6.0 to 1.7.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 1.6.0 to 1.7.0
The Helpshift SDK v1.7.0 is a major update. Please note that we have deprecated some APIs. If you have questions or feedback, please Contact Us
List of deprecated APIs
Deprecated API | New API |
---|---|
HelpshiftCocos2dx::isConversationActive(); | HelpshiftCocos2dx::checkIfConversationActive(...); |
HelpshiftCocos2dx::setSDKLanguage(...); | HelpshiftCocos2dx::setLanguage(...); |
HelpshiftCocos2dx::getNotificationCountFromRemote(...); | HelpshiftCocos2dx::requestUnreadMessagesCount(...); |
Check active Conversation
On Plugin version 1.6.0 or below, you can check if an active Conversation exists as shown below :
if (HelpshiftCocos2dx::isConversationActive()) {
// Active Conversation.
} else {
// No open Conversation.
}
On Plugin version 1.7.0 and above, you can asyncronously check if an active Conversation exists as shown below :
void conversationActive(bool isActive) {
if (isActive == "true") {
// Active Conversation.
} else {
// No open Conversation.
}
}
HelpshiftCocos2dx::checkIfConversationActive(conversationActive);
Set SDK language
On Plugin version 1.6.0 and below, you can set the SDK language as shown below :
HelpshiftCocos2dx::setSDKLanguage("fr");
On Plugin version 1.7.0 and above, you can set the SDK language as shown below :
HelpshiftCocos2dx::setLanguage("fr");
Get count of unread messages
On Plugin version 1.6.0 and below, you can get the count of unread messages as shown below :
int notifCount = HelpshiftCocos2dx::getNotificationCountFromRemote(false);
On Plugin version 1.7.0 and below, you can get the count of unread messages as shown below :
void receivedMessageCount(int count) {
printf("Unread message count: %d\n", count);
}
HelpshiftCocos2dx::requestUnreadMessagesCount(false, receivedMessageCount);