Package zendesk.answerbot
Class AnswerBotUiConfig.Builder
- java.lang.Object
-
- zendesk.answerbot.AnswerBotUiConfig.Builder
-
- Enclosing class:
- AnswerBotUiConfig
public static class AnswerBotUiConfig.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description UiConfig
config()
Create aUiConfig
for the configured options.Intent
intent(Context context, java.util.List<UiConfig> uiConfigs)
Create anIntent
to start theAnswerBotActivity
with the specified configuration options.Intent
intent(Context context, UiConfig... uiConfigs)
Create anIntent
to start theAnswerBotActivity
with the specified configuration options.void
show(Context context, java.util.List<UiConfig> uiConfigs)
DisplayAnswerBotActivity
to the user.void
show(Context context, UiConfig... uiConfigs)
DisplayAnswerBotActivity
to the user.AnswerBotUiConfig.Builder
withBotAvatarDrawable(int avatarDrawableId)
Specify the Drawable resource to use as the avatar for Answer Bot on the conversation interface.AnswerBotUiConfig.Builder
withBotLabelString(java.lang.String botLabelString)
Specify the String to use as the label displayed on Answer Bot's messages in the conversation interface.AnswerBotUiConfig.Builder
withBotLabelStringRes(int stringResourceId)
Specify the String resource to use as the label displayed on Answer Bot's messages in the conversation interface.
-
-
-
Method Detail
-
withBotLabelStringRes
public AnswerBotUiConfig.Builder withBotLabelStringRes(int stringResourceId)
Specify the String resource to use as the label displayed on Answer Bot's messages in the conversation interface. This is "Answer Bot" by default. If both this and #withBotLabelString() are provided, the value passes to #withBotLabelString takes precedence- Parameters:
stringResourceId
- the String resource ID to be used as the label for Answer Bot's messages- Returns:
- the builder
-
withBotLabelString
public AnswerBotUiConfig.Builder withBotLabelString(java.lang.String botLabelString)
Specify the String to use as the label displayed on Answer Bot's messages in the conversation interface. If both this and #withBotLabelStringRes() are provided, this takes precedence- Parameters:
botLabelString
- the String to be used as the label for AnswerBot's messages- Returns:
- the builder
-
withBotAvatarDrawable
public AnswerBotUiConfig.Builder withBotAvatarDrawable(int avatarDrawableId)
Specify the Drawable resource to use as the avatar for Answer Bot on the conversation interface. This is the Answer Bot logo by default.- Parameters:
avatarDrawableId
- the Drawable resource ID to be used as the avatar for Answer Bot in the conversation interface.- Returns:
- the builder
-
show
public void show(Context context, UiConfig... uiConfigs)
DisplayAnswerBotActivity
to the user.- Parameters:
context
- a validContext
uiConfigs
- Configurations for other Zendesk SDK activities that can be started from AnswerBotActivity.
-
show
public void show(Context context, java.util.List<UiConfig> uiConfigs)
DisplayAnswerBotActivity
to the user.- Parameters:
context
- a validContext
uiConfigs
- Configurations for other Zendesk SDK activities that can be started from AnswerBotActivity.
-
config
public UiConfig config()
Create aUiConfig
for the configured options.
-
intent
public Intent intent(Context context, UiConfig... uiConfigs)
Create anIntent
to start theAnswerBotActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onuiConfigs
- Configurations for screen that can be started from AnswerBotActivity.- Returns:
- An
Intent
forAnswerBotActivity
with the specified configuration options
-
intent
public Intent intent(Context context, java.util.List<UiConfig> uiConfigs)
Create anIntent
to start theAnswerBotActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onuiConfigs
- Configurations for screen that can be started from AnswerBotActivity.- Returns:
- An
Intent
forAnswerBotActivity
with the specified configuration options
-
-