SDK Configuration

Helpshift provides several config options which can be used to customize behaviour of the SDK.

Install time configurations

Enable In-App Notifications

If you do not want the in-app notification support provided by the Helpshift SDK, you can set the flag to false. The default value of this flag is true i.e., the in-app notification will be enabled.

Flag
HelpshiftSdk.ENABLE_INAPP_NOTIFICATION
values
true/false
default
true
using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      configMap.Add(HelpshiftSdk.ENABLE_INAPP_NOTIFICATION, false);
      help.Install(platformId, domainName, configMap);
    }
}

Notification Icon

By default the application icon is used as the notification icon. You can customize the notification icon using the config in the install call.

You do not need to specify the file extension for the icon image. If your icon image's file name is "icon.png", you just need to pass "icon" to helpshift config and add the "icon.png" file at <project-dir>/Assets/Plugins/Android/res/drawable.

using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      configMap.Add(HelpshiftSdk.NOTIFICATION_ICON, "<icon-image-file-name>");
      help.Install(platformId, domainName, configMap);
    }
}

Large Notification Icon

By default the application icon is used as the notification icon. If you want to specify the large notification icon also to show up in the notification tray, you can specify that using the config in the install call.

You do not need to specify the file extension for the icon image. If your icon image's file name is "large_icon.png", you just need to pass "large_icon" to helpshift config and add the "large_icon.png" file at <project-dir>/Assets/Plugins/Android/res/drawable.

using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      configMap.Add(HelpshiftSdk.NOTIFICATION_LARGE_ICON, "<large-icon-image-file-name>");
      help.Install(platformId, domainName, configMap);
    }
}

Notification Sound

  • The sound provided here would only be set for the default notification channel that the SDK creates on its own on Android OS 8.0 & above. This sound can only be set once on the default channel and it won’t change if a different sound resource is passed.

  • If the sound needs to be changed later on, it is recommended to create your own notification channels. Refer this.

By default the default device notification sound is used for helpshift notifications. You can customize the notification sound using the config in the install call.

You do not need to specify the file extension for the sound file. If your sound file name is "notificaton_sound.mp3", you just need to pass "notification_sound" to helpshift config and and add the "notificaton_sound.mp3" file at <project-dir>/Assets/Plugins/Android/res/raw.

For example:

using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
        this.help = HelpshiftSdk.GetInstance();
        Dictionary<string, object> configMap = new Dictionary<string, object>();
        configMap.Add(HelpshiftSdk.NOTIFICATION_SOUND_ID, <sound-file-name>);
        help.Install(platformId, domainName, configMap);
    }
}

Notification Channels

Starting from Android Oreo, Helpshift notifications will create a default channel named In-app Support. If you want to customize the name for the default channel, you can do so by using the config in the install call.

For Example-

using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      configMap.Add(HelpshiftSdk.NOTIFICATION_CHANNEL_ID, <your-channel-id>);
      help.Install(platformId, domainName, configMap);
    }
}

Enable Logging

Upon setting enableLogging to true, Helpshift SDK logs will be generated in the Android logcat. Turning on logging can help developers resolve common integration issues.

Flag
HelpshiftSdk.ENABLE_LOGGING
Values
"true"/"false"
Default
"false"
using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      configMap.Add(HelpshiftSdk.ENABLE_LOGGING, true);
      help.Install(platformId, domainName, configMap);
    }
}

Screen Orientation

The screen orientation of Helpshift SDK screens can be fixed by setting the screenOrientation to constants available in the ActivityInfo class. For example, you may want to fix the orientation to ActivityInfo.SCREEN_ORIENTATION_PORTRAIT for mobile users and ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE for tablet users.

Flag
HelpshiftSdk.SCREEN_ORIENTATION
values
integer values for orientation from ActivityInfo class
default
1 (which is ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;

    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      // To make it landscape
      configMap.Add(HelpshiftSdk.SCREEN_ORIENTATION, 0);
      help.Install(platformId, domainName, configMap);
    }
}

Full privacy

In the config dictionary of help.ShowConversation(config); API at the time of calling this API, setting the fullPrivacy option to true ensures COPPA compliance by:

  1. Disabling user-initiated screenshots (users will not be able to attach files, including images, using SDK).
  2. Making sure that Personally Identifiable Information (PII) such as name and email are not collected by SDK (using Identity Bot and/or the helpshiftConfig object). This means that if you set userName and userEmail, with fullPrivacy set to true, Helpshift will not use the userName and userEmail values.

Moreover, in scenarios where the user attaches objectionable content, it becomes a huge COPPA compliance concern. This option helps to solve this problem.

For example

using Helpshift;
// other imports

public class MyGameControl : MonoBehaviour
{
    private HelpshiftSdk help;
    void Awake(){
      this.help = HelpshiftSdk.GetInstance();
      // install call here
    }
    void OpenHelpshift(){
      Dictionary<string, object> configMap = new Dictionary<string, object>();
      configMap.Add("fullPrivacy", "true");
      help.ShowConversation(configMap);
    }
}

UI Configurations

This config represents the theming of Helpshift SDK. For more information check design.

Tracking

This config represents the tracking user actions. For more information check tracking.