Sample Cocos project demonstrating the integration of Helpshift Cocos SDK X
- See Helpshift SDK X requirements here
- Clone the repositiory
- For Android app, Open
SDKXCococsExample/proj.android/in Android Studio
FOR ANDROID
Please follow these steps to build the app:
- Update your Helpshift App credentials in
SDKXCococsExample/proj.android/app/src/org/cocos2dx/cpp/AppActivity.javafile.- Replace domain name in
<your-domain>.helpshift.comand appId in<your-app-android-app-id>string placeholders in this file. - To get your Helpshift app credentials please check here.
- Replace domain name in
FCM push notification is already integrated in the example app but we have not provided the google-services.json file.
- You can configure FCM by providing your own
google-services.jsonfile atSDKXCococsExample/proj.android/app/location. - You can then provide the FCM API Key in Helpshift Dashboard as mentioned here
- Make sure to have same package name for the app your
google-services.jsonfile as it is in Cocos Android Porject
Build the project in your app Editor and Run on your device.
- Refer to
SDKXCococsExample/proj.android/app/src/org/cocos2dx/cpp/AppActivity.javaorios-file-pathclass. - Notice that we have initialized the SDK as soon as the app is launched.
NOTE: Helpshift Install must be called before invoking any other api in the Helpshift SDK.
- Refer to the following functions in
SDKXCococsExample/Classes/IdentityUserScene.cppin example code for User Hub related integration.loginWithIdentityaddUserIdentitiesupdateMasterAttributesupdateAppAttributes
- Please check Developer Documentation for more on User Hub APIs
- Refer to the following functions in
SDKXCococsExample/Classes/LegacyUserScene.cppexample code for User Identification and Management related integrationloginlogout
- Please check Developer Documentation for more on User Management
- Refer to the following function in
SDKXCococsExample/Classes/HelloWorldScene.cppfor SDK configurations:getConfigMap: This function reads config as set by you from UI and constructs a Dictionary as expected by the SDK.
- It contains custom example for CIF, please modify according to your needs.
- Many other configurations are picked from the example app UI.
- Developer Documentation for Configurations
- For example code of various other features please refer to code examples in HelloWorldScene
showConversationShowFAQsShowFAQSectionAddDebugLogsetLanguageleaveBreadcrumbclearBreadCrumbsrequestUnreadMessageCount- many others...
- The code is easy to interpret since each button on UI has been linked with a feature.
- For example if you need example code for showing Conversation Screen, refer function
showConversationin the HelloWorldScene.cpp file. - Developer Documentation for Helpshift's APIs
Copyright 2025, Helpshift, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.