Class MessagingConfiguration.Builder

  • Enclosing class:
    MessagingConfiguration


    public static class MessagingConfiguration.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withEngines

        public MessagingConfiguration.Builder withEngines(java.util.List engines)
        Specify a list of product specific Engines.
        Parameters:
        engines - a list of engines
        Returns:
        the builder
      • withToolbarTitleRes

        public MessagingConfiguration.Builder withToolbarTitleRes(int stringResourceId)
        Specify the String to use as the title of the screen in the conversation interface. This is "Contact us" by default.

        If both this and #withToolbarTitle() are provided, the value passed to #withToolbarTitle takes precedence

        Parameters:
        stringResourceId - the String resource ID to be used as the title for the conversation screen
        Returns:
        the builder
      • withToolbarTitle

        public MessagingConfiguration.Builder withToolbarTitle(java.lang.String toolbarTitle)
        Specify the String to use as the title of the screen in the conversation interface.

        If both this and #withToolbarTitleRes() are provided, this takes precedence

        Parameters:
        toolbarTitle - the String to be used as the label for Bot messages
        Returns:
        the builder
      • withBotLabelStringRes

        public MessagingConfiguration.Builder withBotLabelStringRes(int stringResourceId)
        Specify the String resource to use as the label displayed on Bot messages in the conversation interface. This is "Answer Bot" by default.

        If both this and #withBotLabelString() are provided, the value passed to #withBotLabelString takes precedence

        Parameters:
        stringResourceId - the String resource ID to be used as the label for Bot messages
        Returns:
        the builder
      • withBotLabelString

        public MessagingConfiguration.Builder withBotLabelString(java.lang.String botLabelString)
        Specify the String to use as the label displayed on Bot 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 Bot messages
        Returns:
        the builder
      • withBotAvatarDrawable

        public MessagingConfiguration.Builder withBotAvatarDrawable(int avatarDrawableId)
        Specify the Drawable resource to use as the avatar for Bots 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 Bots in the conversation interface.
        Returns:
        the builder
      • withMultilineResponseOptionsEnabled

        public MessagingConfiguration.Builder withMultilineResponseOptionsEnabled(boolean multilineResponseOptionsEnabled)
        Specify whether to enable text wrapping for quick replies in the conversation interface. If this is enabled (true), quick replies will wrap so that they will all be on screen at once, if it is disabled (false) they will show as a single horizontally scrollable line. Defaults to disabled (false).
        Parameters:
        multilineResponseOptionsEnabled - the flag for whether to enable quick reply text wrapping
        Returns:
        the builder
      • show

        public void show(Context context,
                         Configuration... configurations)
        Display MessagingActivity to the user.
        Parameters:
        context - The context which startActivity will be invoked on.
        configurations - Configurations for other Zendesk SDK activities that can be started from ChatActivity.
      • show

        public void show(Context context,
                         java.util.List<Configuration> configurations)
        Display MessagingActivity to the user.
        Parameters:
        context - The context which startActivity will be invoked on.
        configurations - Configurations for other Zendesk SDK activities that can be started from ChatActivity.
      • config

        public Configuration config(Context context)
        Create a Configuration for the passed in configuration options.
      • intent

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

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