Skip to content

helpshift/helpshift-android-sdkx-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

Helpshift SDK X Android Example App

Sample Android project demonstrating the integration of Helpshift SDK X

Requirements

  • See Helpshift SDK X requirements here

Import project

  1. Clone the repositiory
  2. Open helpshift-sdkx-example in Android Studio or you can directly checkout via version control option in Android Studio

Building the project

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 at helpshift-sdkx-example/app/google-services.json.
    • You can then provide the FCM API Key in Helpshift Dashboard as mentioned here
  • Build the project in Android Studio and Run on your device.

Example feature implementations

Initializing Helpshift SDK via install

  • 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.

User Management

  • Refer to the following package for User related integration and example code: User Management
  • Developer Documentation: User

SDK Configurations

  • 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

Showing Conversation/FAQ screens, Breadcrumbs, Logs, setting Language etc

  • 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

Handling push notifications from Helpshift

  • 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 to MyFirebaseMessagingService. Now since MainApplication.onCreate() is called first, we ensure that Helpshift.install() is called before calling Helpshift.handlePush() api.
  • Developer Documentation: Notifications

Handling Proactive Outbound 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 to ProactiveNotificationActivity or ProactiveDeepLinkActivity. Now since MainApplication.onCreate() is called first, we ensure that Helpshift.install() is called before calling Helpshift.handleProactiveLink() api.

  • Developer Documentation: Proactive Outbound

Handling Deeplinks

Event Delegates

Resources

License

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages