public final class

Helpshift

extends Object
java.lang.Object
   ↳ com.helpshift.Helpshift

Summary

Nested Classes
enum Helpshift.ENABLE_CONTACT_US An Enum to specify the possible options for enableContactUs flag  
enum Helpshift.HS_RATE_ALERT An Enum to descibe the action taken by the user inside the Alert Dialog to Rate App. 
interface Helpshift.HelpshiftDelegate A delegate which defines the session callbacks which are available in the SDK. 
Constants
String HSCustomMetadataKey (Optional) A Reserved key constant to be used; to add custom metadata to the config HashMap.
String HSIssueTagsKey This constant is deprecated. As of release 3.0.1, replaced by HSTagsKey
String HSTagsKey A Reserved key constant to be used with setMetadataCallback to pass String array which get interpreted at server and added as Tags for the conversation submitted.
String HSUserAcceptedTheSolution
String HSUserRejectedTheSolution
String HSUserReviewedTheApp
String HSUserSentScreenShot
Public Methods
static void clearBreadCrumbs()
Clears Breadcrumbs list.
static void getNotificationCount(Handler success, Handler failure)
Gets notification count asynchronously by implementing the countHandler and failHandler.
static Integer getNotificationCount()
Gets notification count synchronously.
static void handlePush(Context context, Intent i)
This will handle push received from Helpshift using either GCM push or Urban Airship.
static void install(Application application, String apiKey, String domain, String appId)
Installs the Helpshift Android SDK in your app.
static void install(Application application, String apiKey, String domain, String appId, HashMap config)
Installs the Helpshift Android SDK in your app with Config.
static void leaveBreadCrumb(String breadCrumb)
Adds additonal debugging information in your code.
static void login(String identifier, String name, String email)
Login a user with a given identifier, name and email.
static void logout()
Logout a currently logged in user.
static void registerDeviceToken(Context context, String deviceToken)
If you are using GCM push or Urban Airship and if you want to enable Push Notification in the Helpshift Android SDK, set the Android Push ID (APID) using this method, inside your IntentReceiver for Handling of Push Events.
static void setDelegate(Helpshift.HelpshiftDelegate delegate)
Set the session delegate for Helpshift
static void setMetadataCallback(HSCallable f)
Provide a function to fetch custom data.
static void setNameAndEmail(String name, String email)
(Optional) You can specify the name and email for your User.
static void setSDKLanguage(String locale)
Set the SDK language for the given locale.
static void setUserIdentifier(String userIdentifier)
(Optional) If you already have indentification for your users, you can specify that as well.
static void showAlertToRateApp(String url, HSAlertToRateAppListener alertToRateAppListener)
Display an alert dialog, which prompts the user to rate your app, or send feedback.
static void showConversation(Activity a, HashMap config)
You can use this api call to provide a way for the user to send feedback or start a new conversation with you.
static void showConversation(Activity a)
You can use this api call to provide a way for the user to send feedback or start a new conversation with you.
static void showFAQSection(Activity a, String sectionPublishId)
Shows FAQ section activity.
static void showFAQSection(Activity a, String sectionPublishId, HashMap config)
Shows FAQ section activity with Config.
static void showFAQs(Activity a, HashMap config)
Shows faqs activity.
static void showFAQs(Activity a)
Shows faqs activity.
static void showSingleFAQ(Activity a, String questionPublishId)
Shows question activity.
static void showSingleFAQ(Activity a, String questionPublishId, HashMap config)
Shows question activity with Config.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String HSCustomMetadataKey

(Optional) A Reserved key constant to be used; to add custom metadata to the config HashMap. This metadata is sent to the server when the user starts a new conversation.

Constant Value: "hs-custom-metadata"

public static final String HSIssueTagsKey

This constant is deprecated.
As of release 3.0.1, replaced by HSTagsKey

A Reserved key constant to be used with setMetadataCallback to pass String array which get interpreted at server and added as Tags for the conversation submitted.

Constant Value: "hs-tags"

public static final String HSTagsKey

A Reserved key constant to be used with setMetadataCallback to pass String array which get interpreted at server and added as Tags for the conversation submitted.

Constant Value: "hs-tags"

public static final String HSUserAcceptedTheSolution

Constant Value: "User accepted the solution"

public static final String HSUserRejectedTheSolution

Constant Value: "User rejected the solution"

public static final String HSUserReviewedTheApp

Constant Value: "User reviewed the app"

public static final String HSUserSentScreenShot

Constant Value: "User sent a screenshot"

Public Methods

public static void clearBreadCrumbs ()

Clears Breadcrumbs list.

Breadcrumbs list stores upto 100 latest actions. You'll receive those in every Issue. But if for reason you want to clear previous messages (On app load, for eg), you can do that by calling following function.

 Helpshift.clearBreadCrumbs ();

public static void getNotificationCount (Handler success, Handler failure)

Gets notification count asynchronously by implementing the countHandler and failHandler. The notification count can be obtained from the message received though the countHandler. Example:-

 private Handler countHandler = new Handler() {
 public void handleMessage(Message msg) {
 super.handleMessage(msg);
 Bundle countData = (Bundle) msg.obj;
 Integer count = countData.getInt("value");
 Boolean cache = countData.getBoolean("cache");
 if (cache) {
 Log.d("Notification Count", "local" + count);
 } else {
 Log.d("Notification Count", "server" + count);
 }
 }
 };
 Helpshift.getNotificationCount(countHandler, new Handler());

Parameters
success Success handler
failure Failure handler

public static Integer getNotificationCount ()

Gets notification count synchronously.

Ex:-

 Integer notifCount = Helpshift.getNotificationCount();

public static void handlePush (Context context, Intent i)

This will handle push received from Helpshift using either GCM push or Urban Airship. It will group all alerts received via. push by their respective issue id. This will also perform the proper isForeground check to see if that issue is visible.
For Example (GCM) :- Inside your GCMIntentService

 @Override
 protected void onMessage(Context context, Intent intent) {
 if(intent.getExtras().getString("origin").equals("helpshift")) {
 Intent i = new Intent();
 i.setAction("HS_ON_MESSAGE");
 i.putExtras(intent);
 sendBroadcast(i);
 }
 }
 }

And inside your GCMIntentReceiver

 @Override
 public void onReceive(Context context, Intent intent) {
 String action = intent.getAction();
 if(action.equals("HS_ON_MESSAGE")) {
 Helpshift.handlePush(context, intent);
 }
 }

For Example (Urban Airship) :-

 @Override
 public void onReceive(Context context, Intent intent) {
 String action = intent.getAction();
 if (action.equals(PushManager.ACTION_PUSH_RECEIVED)) {
 if(intent.getExtras().getString("origin").equals("helpshift")) {
 Helpshift.handlePush(context, intent);
 }
 }
 }

Parameters
context The received context.
i The received intent.

public static void install (Application application, String apiKey, String domain, String appId)

Installs the Helpshift Android SDK in your app.

 Helpshift.install(getApplication(),
 "<YOUR_API_KEY>",
 "<yourcompany>.helpshift.com",
 "<YOUR_APP_ID>");

Parameters
application Your application state.
apiKey Your developer API Key.
domain Your domain name without any http:// or forward slashes.
appId The unique ID assigned to your app.

public static void install (Application application, String apiKey, String domain, String appId, HashMap config)

Installs the Helpshift Android SDK in your app with Config.

 HashMap config = new HashMap();
 config.put("notificationIcon", R.drawable.megaphone);
 config.put("enableInAppNotification", true);
 config.put("notificationSound", R.raw.notification_sound);
 config.put("enableDialogUIForTablets", true);
 

Helpshift.install(getApplication(), "<YOUR_API_KEY>", "<yourcompany>.helpshift.com", "<YOUR_APP_ID>", config);

There are four values supported in this config -

  1. notificationIcon (Default : None) - You can set this value to a resource drawable which will be used as a custom icon when showing notifications.
  2. enableInAppNotification (Default : true) - when set to false; this will disable the Helpshift SDK in-app notifications poller service.
  3. [since SDK version 3.7.2] notificationSound (Default : None) - you can set this value to a raw resource of audio type (.mp3/.wav etc.) which will be used as custom sound when showing notifications.
  4. [since SDK version 3.8.0] enableDialogUIForTablets (Default : false) - when set to true; Helpshift SDK will be opened in Dialog mode on tablet devices.

Parameters
application Your application state.
apiKey Your developer API Key.
domain Your domain name without any http:// or forward slashes.
appId The unique ID assigned to your app.
config The config to install call.

public static void leaveBreadCrumb (String breadCrumb)

Adds additonal debugging information in your code.

You can add additional debugging statements to your code, and see exactly what the user was doing right before they started a new conversation.

 Helpshift.leaveBreadCrumb("Went to Preferences Screen");

Parameters
breadCrumb Action/Message to add to bread-crumbs list.

public static void login (String identifier, String name, String email)

Login a user with a given identifier, name and email. This API introduces support for multiple login in Helpshift. The identifier uniquely identifies the user. Name and email are optional. If any Helpshift session is active, then any login attempt is ignored.

Parameters
identifier The unique identifier of the user.
name (Optional) The name of the user.
email (Optional) The email of the user.

public static void logout ()

Logout a currently logged in user. After logout, Helpshift falls back to the default login. If any Helpshift session is active, then any logout attempt is ignored.

public static void registerDeviceToken (Context context, String deviceToken)

If you are using GCM push or Urban Airship and if you want to enable Push Notification in the Helpshift Android SDK, set the Android Push ID (APID) using this method, inside your IntentReceiver for Handling of Push Events. For Example (GCM) :-

 @Override
 public void onReceive(Context context, Intent intent) {
 String action = intent.getAction();
 

if(action.equals("HS_ON_SEND")) { final String regId = GCMRegistrar.getRegistrationId(context); Helpshift.registerDeviceToken(context, regId); } }

For Example (Urban Airship) :-

 @Override
 public void onReceive(Context context, Intent intent) {
 String action = intent.getAction();
 if (action.equals(PushManager.ACTION_REGISTRATION_FINISHED)) {
 final String regId = PushManager.shared().getAPID();
 Helpshift.registerDeviceToken(context, regId);
 }
 }

Parameters
context The received context.
deviceToken This is the Android Push ID (APID)

public static void setDelegate (Helpshift.HelpshiftDelegate delegate)

Set the session delegate for Helpshift

Parameters
delegate The HelpshiftDelegate object.

public static void setMetadataCallback (HSCallable f)

Provide a function to fetch custom data.

 import com.helpshift.HSCallable;
 

String [] tags = new String [] ("hello", "world");

HashMap k = new HashMap(); k.put ("foo", "bar"); k.put ("baz", "qux"); k.put (Helpshift.HSTagsKey, tags);

Helpshift.setMetadataCallback (new HSCallable (){ public HashMap call() { return k; } });

Parameters
f HSCallbale object with call method implemented.
See Also

public static void setNameAndEmail (String name, String email)

(Optional) You can specify the name and email for your User. If you want to reset both values, you should pass null for both params.

For example:

 Helpshift.setNameAndEmail("John", "john@example.com");

Parameters
name User name
email User email

public static void setSDKLanguage (String locale)

Set the SDK language for the given locale. Locale can contain two-letter lowercase ISO language codes (such as "en") as defined by ISO 639-1 and in addition contain two-letter uppercase ISO country codes (such as "US") as defined by ISO 3166-1. Language code and country code are separated by an underscore ("_"). Example - "pt_BR", "zh_CN".



Example - Setting SDK language for the given locale with only language code.

 Helpshift.setSDKLanguage("fr");
 

Example - Setting the SDK language for the given locale with both language code and country code.

 Helpshift.setSDKLanguage("zh_CN");
 

Parameters
locale locale contains either language code or both language code and country code.

public static void setUserIdentifier (String userIdentifier)

(Optional) If you already have indentification for your users, you can specify that as well.

For example:

 Helpshift.setUserIdentifier("user-id-100");

Parameters
userIdentifier A custom user Identifier.

public static void showAlertToRateApp (String url, HSAlertToRateAppListener alertToRateAppListener)

Display an alert dialog, which prompts the user to rate your app, or send feedback. The alertview is not shown if a conversation is currently running with the user or if you give a null/invalid url. Example:

 String playStoreUrl = "market://details?id=<package_name>";
 HSAlertToRateAppListener actionListener =  new HSAlertToRateAppListener() {
 @Override
 public void onAction(Helpshift.HS_RATE_ALERT action) {
 String msg = "";
 switch (action) {
 case CLOSE:
 msg = "Close";
 break;
 case FEEDBACK:
 msg = "Feedback";
 break;
 case SUCCESS:
 msg = "Rate app";
 break;
 case FAIL:
 msg = "Alert did not show";
 break;
 }
 Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
 }
 };
 Helpshift.showAlertToRateApp(playStoreUrl, actionListener);

Parameters
url Android application link.
alertToRateAppListener The callback which will run onAction.

public static void showConversation (Activity a, HashMap config)

You can use this api call to provide a way for the user to send feedback or start a new conversation with you.

For Example:-

 HashMap customMetadata = new HashMap();
 customMetadata.put("usertype", "paid");
 customMetadata.put("level", "7");
 customMetadata.put("score", "12345");
 

contactUsBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { HashMap config = new HashMap (); config.put("gotoConversationAfterContactUs", true); config.put("requireEmail", true); config.put("showConversationResolutionQuestion", true); config.put(Helpshift.HSCustomMetadataKey, customMetadata); Helpshift.showConversation(MyActivity.this, config); } });

Following flags are supported in this config -

  1. gotoConversationAfterContactUs (Default : false) If set to true. Helpshift SDK will land on conversation activity after starting a new conversation. If set to false Helpshift SDK will land on last activity before starting a new conversation.
  2. [since SDK version 3.4.1] requireEmail (Default : false) If requireEmail flag is set to true, an e-mail address is required while starting a new conversation. Default value is false i.e. e-mail is optional.
  3. [since SDK version 3.5.0] conversationPrefillText The conversationPrefillText API option will pre-fill a new conversation description, with the supplied string. This is useful where you might want your users to send you diagnostic information in the conversation description, for example if the app hits an exception, etc Applicable only in the showConversation API
  4. [since SDK version 3.5.0] hideNameAndEmail (Default : false) If hideNameAndEmail flag is set to true, the Name and Email field will not be shown in the new conversation form. If the name and email are set via API, they will be sent along with the issue. Default value is false i.e Name and Email fields are shown
  5. [since SDK version 3.6.0] enableFullPrivacy (Default : false) If enableFullPrivacy flag is set to true, no private data will be sent which can be used to identify a user. This helps developers ensure full COPPA compliance. Default value is false i.e all user data will be sent
  6. [since SDK version 3.6.0] showSearchOnNewConversation (Default : false) If showSearchOnNewConversation flag is set to true, the user will be taken to a view which shows the search results for the conversation text that he has entered. This is to avoid tickets which are already answered in the FAQs. The user will still be able to start a new conversation with the same text. Alternatively he can go through one of the FAQs and find a solution to his query. Default value is false i.e no search after Send button is pressed
  7. [since SDK version 3.11.0] showConversationResolutionQuestion (Default : false) When set to true; Helpshift SDK will show the conversation resolution question, in which the user can confirm if the conversation was resolved by clicking either the Yes or No button. When set to false (default), on resolution the Helpshift SDK will take the user directly to the "Start a new conversation" state.

Parameters
a The Activity from which you call showConversation.
config Extra config.

public static void showConversation (Activity a)

You can use this api call to provide a way for the user to send feedback or start a new conversation with you.

For Example:-

 contactUsBtn.setOnClickListener(new OnClickListener() {
 @Override
 public void onClick(View view) {
 Helpshift.showConversation(MyActivity.this);
 }
 });
 

Parameters
a The Activity from which you call showConversation.

public static void showFAQSection (Activity a, String sectionPublishId)

Shows FAQ section activity.

This will show a FAQ section view with list of questions in that section. The search inside this view will be limited to the specified section. You can specify a section using publish ID of that section.

For example, this can be triggered on the onClick of showFAQSectionBtn Button

 showFAQSectionBtn.setOnClickListener(new OnClickListener() {
 @Override
 public void onClick(View view) {
 Helpshift.showFAQSection(MyActivity.this, "1");
 }
 });
 

Parameters
a The Activity from which you show section activity.
sectionPublishId Id specifying a section.

public static void showFAQSection (Activity a, String sectionPublishId, HashMap config)

Shows FAQ section activity with Config.

This will show a FAQ section view with list of questions in that section. The search inside this view will be limited to the specified section. You can specify a section using publish ID of that section.

For example, this can be triggered on the onClick of showFAQSectionBtn Button

 HashMap customMetadata = new HashMap();
 customMetadata.put("usertype", "paid");
 customMetadata.put("level", "7");
 customMetadata.put("score", "12345");
 

showFAQSectionBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { HashMap config = new HashMap (); config.put("gotoConversationAfterContactUs", false); config.put("enableContactUs", Helpshift.ENABLE_CONTACT_US.NEVER); config.put("requireEmail", true); config.put("showConversationResolutionQuestion", true); config.put(Helpshift.HSCustomMetadataKey, customMetadata); Helpshift.showFAQSection(MyActivity.this, "1", config); } });

Following flags and options are supported in this config -

  1. gotoConversationAfterContactUs (Default : false) If set to true. Helpshift SDK will land on conversation activity after starting a new conversation. If set to false Helpshift SDK will land on last activity before starting a new conversation.
  2. enableContactUs (Default : Helpshift.ENABLE_CONTACT_US.ALWAYS) The enableContactUs flag will determine whether the Contact Us button is shown. The default value is Helpshift.ENABLE_CONTACT_US.ALWAYS.
  3. [since SDK version 3.4.1] requireEmail (Default : false) If requireEmail flag is set to true, an e-mail address is required while starting a new conversation. Default value is false i.e. e-mail is optional.
  4. [since SDK version 3.5.0] hideNameAndEmail (Default : false) If hideNameAndEmail flag is set to true, the Name and Email field will not be shown in the new conversation form. If the name and email are set via API, they will be sent along with the issue. Default value is false i.e Name and Email fields are shown
  5. [since SDK version 3.6.0] enableFullPrivacy (Default : false) If enableFullPrivacy flag is set to true, no private data will be sent which can be used to identify a user. This helps developers ensure full COPPA compliance. Default value is false i.e all user data will be sent
  6. [since SDK version 3.10.0] showSearchOnNewConversation (Default : false) If showSearchOnNewConversation flag is set to true, the user will be taken to a view which shows the search results for the conversation text that he has entered. This is to avoid tickets which are already answered in the FAQs. The user will still be able to start a new conversation with the same text. Alternatively he can go through one of the FAQs and find a solution to his query. This flag will be ignored if the user has conducted any search or if user is filing the issue from Question screen Default value is false i.e no search after Send button is pressed
  7. [since SDK version 3.11.0] showConversationResolutionQuestion (Default : false) When set to true; Helpshift SDK will show the conversation resolution question, in which the user can confirm if the conversation was resolved by clicking either the Yes or No button. When set to false (default), on resolution the Helpshift SDK will take the user directly to the "Start a new conversation" state.
  8. [since SDK version 3.11.0] withTagsMatching The withTagsMatching option will be a Map containing 2 keys
    • "operator" : one of “and”, “or”, “not” which will serve as conditional operators for the given tags (String).
    • "tags" : the actual tags in the query (String Array)
    Example: This will show all FAQs with tags “android-phone” or “android-tablet”: Map filterTagsConfig = new HashMap<>(); String operator = "or"; String[] filterTags = new String[]{"android-phone", "android-tablet"}; map.put("operator", operator); map.put("tags", filterTags); HashMap config = new HashMap(); config.put("withTagsMatching", filterTagsConfig); Helpshift.showFAQSection(MyActivity.this, "1", config);

Parameters
a The Activity from which you show section activity.
sectionPublishId Id specifying a section.
config Additional config.

public static void showFAQs (Activity a, HashMap config)

Shows faqs activity. This will show list of sections with search.

 HashMap customMetadata = new HashMap();
 customMetadata.put("usertype", "paid");
 customMetadata.put("level", "7");
 customMetadata.put("score", "12345");
 

showFaqsBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { HashMap config = new HashMap (); config.put("gotoConversationAfterContactUs", true); config.put("enableContactUs", Helpshift.ENABLE_CONTACT_US.ALWAYS); config.put("requireEmail", true); config.put("showConversationResolutionQuestion", true); config.put(Helpshift.HSCustomMetadataKey, customMetadata); Helpshift.showFAQs(MyActivity.this, config); } });

Following flags and options are supported in this config -

  1. gotoConversationAfterContactUs (Default : false) If set to true. Helpshift SDK will land on conversation activity after starting a new conversation. If set to false Helpshift SDK will land on last activity before starting a new conversation.
  2. enableContactUs (Default : Helpshift.ENABLE_CONTACT_US.ALWAYS) The enableContactUs flag will determine whether the Contact Us button is shown. The default value is Helpshift.ENABLE_CONTACT_US.ALWAYS.
  3. [since SDK version 3.4.1] requireEmail (Default : false) If requireEmail flag is set to true, an e-mail address is required while starting a new conversation. Default value is false i.e. e-mail is optional.
  4. [since SDK version 3.5.0] hideNameAndEmail (Default : false) If hideNameAndEmail flag is set to true, the Name and Email field will not be shown in the new conversation form. If the name and email are set via API, they will be sent along with the issue. Default value is false i.e Name and Email fields are shown
  5. [since SDK version 3.6.0] enableFullPrivacy (Default : false) If enableFullPrivacy flag is set to true, no private data will be sent which can be used to identify a user. This helps developers ensure full COPPA compliance. Default value is false i.e all user data will be sent
  6. [since SDK version 3.10.0] showSearchOnNewConversation (Default : false) If showSearchOnNewConversation flag is set to true, the user will be taken to a view which shows the search results for the conversation text that he has entered. This is to avoid tickets which are already answered in the FAQs. The user will still be able to start a new conversation with the same text. Alternatively he can go through one of the FAQs and find a solution to his query. This flag will be ignored if the user has conducted any search or if user is filing the issue from Question screen Default value is false i.e no search after Send button is pressed
  7. [since SDK version 3.11.0] showConversationResolutionQuestion (Default : false) When set to true; Helpshift SDK will show the conversation resolution question, in which the user can confirm if the conversation was resolved by clicking either the Yes or No button. When set to false (default), on resolution the Helpshift SDK will take the user directly to the "Start a new conversation" state.
  8. [since SDK version 3.11.0] withTagsMatching The withTagsMatching option will be a Map containing 2 keys
    • "operator" : one of “and”, “or”, “not” which will serve as conditional operators for the given tags (String).
    • "tags" : the actual tags in the query (String Array)
    Example: This will show all FAQs with tags “android-phone” or “android-tablet”: Map filterTagsConfig = new HashMap<>(); String operator = "or"; String[] filterTags = new String[]{"android-phone", "android-tablet"}; map.put("operator", operator); map.put("tags", filterTags); HashMap config = new HashMap(); config.put("withTagsMatching", filterTagsConfig); Helpshift.showFAQs(MyActivity.this, config);

Parameters
a The Activity from which you call show faqs activity.
config Extra config.

public static void showFAQs (Activity a)

Shows faqs activity. This will show list of sections with search.

 showFaqsBtn.setOnClickListener(new OnClickListener() {
 @Override
 public void onClick(View view) {
 Helpshift.showFAQs(MyActivity.this);
 }
 });
 

Parameters
a The Activity from which you call show faqs activity.

public static void showSingleFAQ (Activity a, String questionPublishId)

Shows question activity.

This provides show question view provided a publish id of that section. For example, this can be triggered on the onClick of showSingleFAQBtn Button.

 showSingleFAQBtn.setOnClickListener(new OnClickListener() {
 @Override
 public void onClick(View view) {
 Helpshift.showSingleFAQ(MyActivity.this, "1");
 }
 });
 

Parameters
a The Activity from which you call show question activity.
questionPublishId Id specifying a section.

public static void showSingleFAQ (Activity a, String questionPublishId, HashMap config)

Shows question activity with Config.

This provides show question view provided a publish id of that section. For example, this can be triggered on the onClick of showSingleFAQBtn Button.

 HashMap customMetadata = new HashMap();
 customMetadata.put("usertype", "paid");
 customMetadata.put("level", "7");
 customMetadata.put("score", "12345");
 

showSingleFAQBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { HashMap config = new HashMap (); config.put("gotoConversationAfterContactUs", false); config.put("enableContactUs", Helpshift.ENABLE_CONTACT_US.NEVER); config.put("requireEmail", true); config.put("showConversationResolutionQuestion", true); config.put(Helpshift.HSCustomMetadataKey, customMetadata); Helpshift.showSingleFAQ(MyActivity.this, "1", config); } });

Following flags are supported in this config -

  1. gotoConversationAfterContactUs (Default : false) If set to true. Helpshift SDK will land on conversation activity after starting a new conversation. If set to false Helpshift SDK will land on last activity before starting a new conversation.
  2. enableContactUs (Default : Helpshift.ENABLE_CONTACT_US.ALWAYS) The enableContactUs flag will determine whether the Contact Us button is shown. The default value is Helpshift.ENABLE_CONTACT_US.ALWAYS.
  3. [since SDK version 3.4.1] requireEmail (Default : false) If requireEmail flag is set to true, an e-mail address is required while starting a new conversation. Default value is false i.e. e-mail is optional.
  4. [since SDK version 3.5.0] hideNameAndEmail (Default : false) If hideNameAndEmail flag is set to true, the Name and Email field will not be shown in the new conversation form. If the name and email are set via API, they will be sent along with the issue. Default value is false i.e Name and Email fields are shown
  5. [since SDK version 3.6.0] enableFullPrivacy (Default : false) If enableFullPrivacy flag is set to true, no private data will be sent which can be used to identify a user. This helps developers ensure full COPPA compliance. Default value is false i.e all user data will be sent
  6. [since SDK version 3.11.0] showConversationResolutionQuestion (Default : false) When set to true; Helpshift SDK will show the conversation resolution question, in which the user can confirm if the conversation was resolved by clicking either the Yes or No button. When set to false (default), on resolution the Helpshift SDK will take the user directly to the "Start a new conversation" state.

Parameters
a The Activity from which you call show question activity.
questionPublishId Id specifying a section.
config Additional config.