Package com.zendesk.sdk.support
Class SupportActivity.Builder
- java.lang.Object
-
- com.zendesk.sdk.support.SupportActivity.Builder
-
- Enclosing class:
- SupportActivity
public static class SupportActivity.Builder extends java.lang.Object
This builder is used to generate the startup configuration for the Activity. Note that only one of the following may be specified. If you specify both, then the last to be specified is used:- withArticlesForCategoryIds
- withArticlesForSectionIds
-
-
Constructor Summary
Constructors Constructor and Description Builder()
Creates a new Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
show(Context context)
Shows the activity.SupportActivity.Builder
showContactUsButton(boolean showContactUsButton)
Define if the create ticket Floating Action Button should be visible or not.SupportActivity.Builder
showConversationsMenuButton(boolean showConversationsMenuButton)
Client-side API to specify whether or not to show the conversations button in the Toolbar of theSupportActivity
.SupportActivity.Builder
withArticlesForCategoryIds(long... categoryIds)
Specifies a startup configuration which will show articles for a given set of category IDsSupportActivity.Builder
withArticlesForSectionIds(long... sectionIds)
Specifies a startup configuration which will show articles for a given set of section IDsSupportActivity.Builder
withCategoriesCollapsed(boolean categoriesCollapsed)
Specifies whether or not to show all categories in the Help Center in their collapsed state when the content loads.SupportActivity.Builder
withContactConfiguration(ZendeskFeedbackConfiguration configuration)
Sets the Configuration for the Contact component, if a non-null instance ofZendeskFeedbackConfiguration
this will be used to provide a set of values to the Contact component to enhance the request creation.SupportActivity.Builder
withLabelNames(java.lang.String... labelNames)
Specifies a startup configuration which will restrict the shown articles to ones that match the provided label names.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new Builder. CallSupportActivity.Builder.show(Context)
to start the Activity
-
-
Method Detail
-
withArticlesForCategoryIds
public SupportActivity.Builder withArticlesForCategoryIds(long... categoryIds)
Specifies a startup configuration which will show articles for a given set of category IDs- Parameters:
categoryIds
- the category Ids to list articles for- Returns:
- the builder
-
withArticlesForSectionIds
public SupportActivity.Builder withArticlesForSectionIds(long... sectionIds)
Specifies a startup configuration which will show articles for a given set of section IDs- Parameters:
sectionIds
- the section IDs to list articles for- Returns:
- the builder
-
showContactUsButton
public SupportActivity.Builder showContactUsButton(boolean showContactUsButton)
Define if the create ticket Floating Action Button should be visible or not.- Parameters:
showContactUsButton
- Pass in true if the button should be shown, false if it should be hidden- Returns:
- The builder
-
withContactConfiguration
public SupportActivity.Builder withContactConfiguration(ZendeskFeedbackConfiguration configuration)
Sets the Configuration for the Contact component, if a non-null instance ofZendeskFeedbackConfiguration
this will be used to provide a set of values to the Contact component to enhance the request creation.- Parameters:
configuration
- instance ofZendeskFeedbackConfiguration
to be passed to the configuration- Returns:
- The builder
-
withLabelNames
public SupportActivity.Builder withLabelNames(java.lang.String... labelNames)
Specifies a startup configuration which will restrict the shown articles to ones that match the provided label names.- Parameters:
labelNames
- the array of label names to which the Help Center will be restricted.- Returns:
- The Builder
-
withCategoriesCollapsed
public SupportActivity.Builder withCategoriesCollapsed(boolean categoriesCollapsed)
Specifies whether or not to show all categories in the Help Center in their collapsed state when the content loads. If not specified, a default value of false is used.- Parameters:
categoriesCollapsed
- true if the Help Center should initially show all categories in their collapsed state, false if categories should be shown in their expanded state, with sections and articles listed underneath.- Returns:
- The Builder
-
showConversationsMenuButton
public SupportActivity.Builder showConversationsMenuButton(boolean showConversationsMenuButton)
Client-side API to specify whether or not to show the conversations button in the Toolbar of theSupportActivity
. If not specified, a default value oftrue
is used. The value is used in conjunction with the conversations settings from the server. If conversations are not enabled on the server, the value provided here will not be taken into account. Only if both values evaluate totrue
will the menu item will be shown in the Toolbar.- Parameters:
showConversationsMenuButton
- true if the conversations menu item should be shown in the Toolbar, false if not.- Returns:
- The Builder
-
show
public void show(Context context)
Shows the activity.- Parameters:
context
- The context whichstartActivity
will be invoked on
-
-