Class 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 a UiConfig for the configured options.
      Intent intent(Context context, java.util.List<UiConfig> uiConfigs)
      Create an Intent to start the AnswerBotActivity with the specified configuration options.
      Intent intent(Context context, UiConfig... uiConfigs)
      Create an Intent to start the AnswerBotActivity with the specified configuration options.
      void show(Context context, java.util.List<UiConfig> uiConfigs)
      Display AnswerBotActivity to the user.
      void show(Context context, UiConfig... uiConfigs)
      Display AnswerBotActivity 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder()
    • 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)
        Display AnswerBotActivity to the user.
        Parameters:
        context - a valid Context
        uiConfigs - Configurations for other Zendesk SDK activities that can be started from AnswerBotActivity.
      • show

        public void show(Context context,
                         java.util.List<UiConfig> uiConfigs)
        Display AnswerBotActivity to the user.
        Parameters:
        context - a valid Context
        uiConfigs - Configurations for other Zendesk SDK activities that can be started from AnswerBotActivity.
      • config

        public UiConfig config()
        Create a UiConfig for the configured options.
      • intent

        public Intent intent(Context context,
                             UiConfig... uiConfigs)
        Create an Intent to start the AnswerBotActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        uiConfigs - Configurations for screen that can be started from AnswerBotActivity.
        Returns:
        An Intent for AnswerBotActivity with the specified configuration options
      • intent

        public Intent intent(Context context,
                             java.util.List<UiConfig> uiConfigs)
        Create an Intent to start the AnswerBotActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        uiConfigs - Configurations for screen that can be started from AnswerBotActivity.
        Returns:
        An Intent for AnswerBotActivity with the specified configuration options