Sample Android project demonstrating the integration of Helpshift SDK X
- See Helpshift SDK X requirements here
- Clone the repositiory
- Open
helpshift-sdkx-example
in Android Studio or you can directly checkout via version control option in Android Studio
Please follow these steps to build the app:
- Update your Helpshift App credentials in
helpshift-sdkx-example/installCreds.gradle
file. To get your Helpshift app credentials please check here. - FCM push notification is already integrated in the example app but we have provided a dummy
google-services.json
file.- You can configure FCM by providing your own
google-services.json
file athelpshift-sdkx-example/app/google-services.json
. - You can then provide the FCM API Key in Helpshift Dashboard as mentioned here
- You can configure FCM by providing your own
- Build the project in Android Studio and Run on your device.
- Refer to
MainApplication.java
class,onCreate()
method. - 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 package for User related integration and example code: User Management
- Developer Documentation: User
- Refer to the following package for SDK configurations: Configurations
- It contains custom example for CIF, please modify according to your needs.
- Many other configurations are picked from the example app UI.
- You can check the configurations taken at runtime in this example code: Configuration from UI
- Developer Documentation: Configurations
- For example code of various other features please refer to code examples in MainAcitvity
- 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, start refering from Conversation onClick
- Developer Documentation: Helpshift APIs
- To handle push notifications from Helpshift, refer the following code example: Helpshift Push Notification
- Notice that we have checked "origin" as "helpshift" before calling
handlePush
with the SDK. - NOTE: In case the app is killed in background, the system will first invoke
MainApplication.onCreate()
and only then delegate control toMyFirebaseMessagingService
. Now sinceMainApplication.onCreate()
is called first, we ensure thatHelpshift.install()
is called before callingHelpshift.handlePush()
api. - Developer Documentation: Notifications
-
To show Proactive Outbound notification on device when receiving push notifications check the code sample here: Outbound Notification
-
Handling click of this notification: Handle Proactive Outbound Notification Click
-
Handling Proactive Outbound links as deep links: Proactive Outbound as Deeplink
-
NOTE: In case the app is killed in background, the system will first invoke
MainApplication.onCreate()
and only then delegate control toProactiveNotificationActivity
orProactiveDeepLinkActivity
. Now sinceMainApplication.onCreate()
is called first, we ensure thatHelpshift.install()
is called before callingHelpshift.handleProactiveLink()
api. -
Developer Documentation: Proactive Outbound
- Example code to handle deeplinks: Deeplinks example
- Developer Documentation: Deep Linking
- Example code to check delegate callbacks from Helpshift SDK: Event Listener Example
- Documentation: https://developers.helpshift.com/sdkx_android/getting-started/
- Release Notes: https://developers.helpshift.com/sdkx_android/release-notes/
Copyright 2021, 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.