Adding Help Center
Help Center by Zendesk Guide provides your customers with a web-based, self-service knowledge base. You can use the Support SDK to show localized content in your Help Center, filter its contents to be more helpful, and use it as a jumping off point for creating a ticket.
The HelpCenterActivity adds Help Center to your Android app.
If you need to build your own UIs, the SDK also has an API provider that gives you access to your organization's Help Center. See HelpCenterProvider in the Support SDK Javadocs.
Topics covered in this section:
- UI overview
- Show Help Center
- Filter articles by category
- Filter articles by section
- Filter articles by label
- Show a single article
- Configure the ticket form
- Disable ticket creation
- Overriding device locale
A Zendesk admin has activated Help Center in Zendesk Support. See Activating Help Center in the Support Help Center
One or more articles have been published in the knowledge base
a Zendesk admin has enabled Enable Guide for your Android app in Zendesk Support. See Configuring the SDK in Zendesk Support in the Support Help Center
The default UI of the HelpCenterActivity looks as follows:
To change the look and feel of the UI, see Customizing the look. The UI doesn't inherit any styling from the web-based version of your Help Center.
The UI is localized in 19 languages and selects the appropriate language based on the device locale. The articles in your Help Center must be localized to view them in another language.
Tapping an article in the list shows the article content:
If the user can't find an answer in Help Center, they have the option of tapping a Plus (+) button to open a ticket form:
To configure the activity's ticket form, see Configure the ticket form of other SDK activities.
You can disable the ticket form if you don't want it, or if you prefer adding a separate ticket form.
Show Help Center
show() method of the HelpCenterActivity builder. Example:
Filter articles by category
withArticlesForCategoryIds() method of the HelpCenterActivity builder. Example:
HelpCenterActivity.builder() .withArticlesForCategoryIds(112233L, 223344L) .show(this);
Filter articles by section
withArticlesForSectionIds() method of the HelpCenterActivity builder. Example:
HelpCenterActivity.builder() .withArticlesForSectionIds(112233L, 223344L) .show(this);
Filter articles by label
withLabelNames() method of the HelpCenterActivity builder. Example:
HelpCenterActivity.builder() .withLabelNames("android", "android_o") .show(this);
Show a single article
To open a specific article, get the article's id, then start the
ViewArticleActivity with its builder.
Configure the ticket form
You can configure the ticket form of the HelpCenterActivity so that each new ticket has a common subject, common tags, or common file attachments. You can also set common values for one or more custom ticket fields, or set the custom ticket form to use agent interface in the Zendesk Support.
First, configure the ticket form with the
config() method of the RequestActivity builder. See config in the RequestActivity reference. The
config() method returns a UiConfig object.
Second, pass the UiConfig object to the
show method of the HelpCenterActivity builder.
UiConfig requestActivityConfig = RequestActivity.builder() .withRequestSubject("Android ticket") .withTags("android", "mobile") .config(); HelpCenterActivity.builder() .show(MyActivity.this, requestActivityConfig);
Disable ticket creation
The Help Center has floating action buttons that the user can tap to open a UI to create a ticket. The button is visible by default in both the Help Center article list view and article view. You can hide the button in one or both places.
Disable ticket creation in the article list view
withContactUsButtonVisible() method of the HelpCenterActivity builder. Example:
HelpCenterActivity.builder() .withContactUsButtonVisible(false) .show(this);
Disable ticket creation in the article view
Create a config object, then pass it to HelpCenterActivity.
UiConfig articleConfig = ViewArticleActivity.builder() .withContactUsButtonVisible(false) .config(); HelpCenterActivity.builder() .show(this, articleConfig);
Disable ticket creation in both views
withContactUsButtonVisible() method with a UiConfig object from the ViewArticleActivity:
UiConfig articleConfig = ViewArticleActivity.builder() .withContactUsButtonVisible(false) .config(); HelpCenterActivity.builder() .withContactUsButtonVisible(false) .show(this, articleConfig);
Overriding device locale
If you want to manually specify what language to use when fetching Help Center content, you can do so as follows:
This applies to all Help Center content fetched with the UI and providers. The override ignores
the device locale and the languages configured in the Zendesk Guide admin console, so overriding with
Locale will result in empty Help Center responses. Make sure to override with a valid