Package 

Object ChatUI


  • 
    public class ChatUI
    
                        

    ChatUI handles any configuration for the Chat UI elements.

    • Method Detail

      • getNavigator

         final static ChatNavigator getNavigator()

        A class responsible for handling navigation to chat destinations. Allows overriding a default navigation between chat components.

      • setNavigator

         final static Unit setNavigator(ChatNavigator navigator)

        A class responsible for handling navigation to chat destinations. Allows overriding a default navigation between chat components.

      • getImageAssetTransformer

         final static ImageAssetTransformer getImageAssetTransformer()

        Provides a custom implementation for loading images.

      • setImageAssetTransformer

         final static Unit setImageAssetTransformer(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) ImageAssetTransformer imageAssetTransformer)

        Provides a custom implementation for loading images.

      • getDownloadAttachmentUriGenerator

         final static DownloadAttachmentUriGenerator getDownloadAttachmentUriGenerator()

        Generates a download URI for the given attachment.

      • setDownloadAttachmentUriGenerator

         final static Unit setDownloadAttachmentUriGenerator(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) DownloadAttachmentUriGenerator downloadAttachmentUriGenerator)

        Generates a download URI for the given attachment.

      • getDownloadRequestInterceptor

         final static DownloadRequestInterceptor getDownloadRequestInterceptor()

        Intercepts and modifies the download request before it is enqueued.

      • setDownloadRequestInterceptor

         final static Unit setDownloadRequestInterceptor(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) DownloadRequestInterceptor downloadRequestInterceptor)

        Intercepts and modifies the download request before it is enqueued.

      • getImageHeadersProvider

         final static ImageHeadersProvider getImageHeadersProvider()

        Provides HTTP headers for image loading requests.

      • setImageHeadersProvider

         final static Unit setImageHeadersProvider(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) ImageHeadersProvider imageHeadersProvider)

        Provides HTTP headers for image loading requests.

      • getVideoHeadersProvider

         final static VideoHeadersProvider getVideoHeadersProvider()

        Provides HTTP headers for video loading requests.

      • setVideoHeadersProvider

         final static Unit setVideoHeadersProvider(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) VideoHeadersProvider videoHeadersProvider)

        Provides HTTP headers for video loading requests.

      • getFonts

         final static ChatFonts getFonts()

        Allows setting default fonts used by UI components.

      • setFonts

         final static Unit setFonts(ChatFonts fonts)

        Allows setting default fonts used by UI components.

      • getMessageTextTransformer

         final static ChatMessageTextTransformer getMessageTextTransformer()

        Allows customising the message text's format or style.

        For example, it can be used to provide markdown support in chat or it can be used to highlight specific messages by making them bold etc.

      • setMessageTextTransformer

         final static Unit setMessageTextTransformer(ChatMessageTextTransformer messageTextTransformer)

        Allows customising the message text's format or style.

        For example, it can be used to provide markdown support in chat or it can be used to highlight specific messages by making them bold etc.

      • getReactionPushEmojiFactory

         final static ReactionPushEmojiFactory getReactionPushEmojiFactory()

        Allows overriding default emojis for reactions in push notifications.

      • setReactionPushEmojiFactory

         final static Unit setReactionPushEmojiFactory(ReactionPushEmojiFactory reactionPushEmojiFactory)

        Allows overriding default emojis for reactions in push notifications.

      • getChannelNameFormatter

         final static ChannelNameFormatter getChannelNameFormatter()

        Allows to generate a name for the given channel.

      • setChannelNameFormatter

         final static Unit setChannelNameFormatter(ChannelNameFormatter channelNameFormatter)

        Allows to generate a name for the given channel.

      • getDateFormatter

         final static DateFormatter getDateFormatter()

        Allows formatting date-time objects as strings.

      • setDateFormatter

         final static Unit setDateFormatter(DateFormatter dateFormatter)

        Allows formatting date-time objects as strings.

      • getDurationFormatter

         final static DurationFormatter getDurationFormatter()

        Allows formatting durations as strings.

      • setDurationFormatter

         final static Unit setDurationFormatter(DurationFormatter durationFormatter)

        Allows formatting durations as strings.

      • getUseDocumentGView

         final static Boolean getUseDocumentGView()

        Whether to use Google Docs Viewer (gview) for document attachments.

        When true (default), documents are rendered via the legacy AttachmentDocumentActivity which loads them through Google Docs Viewer. When false, text-based files (TXT, HTML) are rendered in-app and other file types are downloaded and opened with an external application.

      • setUseDocumentGView

         final static Unit setUseDocumentGView(Boolean useDocumentGView)

        Whether to use Google Docs Viewer (gview) for document attachments.

        When true (default), documents are rendered via the legacy AttachmentDocumentActivity which loads them through Google Docs Viewer. When false, text-based files (TXT, HTML) are rendered in-app and other file types are downloaded and opened with an external application.

      • getStreamCdnImageResizing

         final static StreamCdnImageResizing getStreamCdnImageResizing()

        Sets the strategy for resizing images hosted on Stream's CDN. Disabled by default, set StreamCdnImageResizing.imageResizingEnabled to true if you wish to enable resizing images. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.

      • setStreamCdnImageResizing

         final static Unit setStreamCdnImageResizing(@Deprecated(message = Use streamCdnImageResizer (defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP). For custom behavior, provide your own StreamCdnImageResizer. This percentage-based config has no one-token replacement — migrate manually.) StreamCdnImageResizing streamCdnImageResizing)

        Sets the strategy for resizing images hosted on Stream's CDN. Disabled by default, set StreamCdnImageResizing.imageResizingEnabled to true if you wish to enable resizing images. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.

      • getStreamCdnImageResizer

         final static StreamCdnImageResizer getStreamCdnImageResizer()

        Sets the strategy for resizing images hosted on Stream's CDN. Defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP. Set it to NoOpStreamCdnImageResizer to disable resizing. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.

      • setStreamCdnImageResizer

         final static Unit setStreamCdnImageResizer(StreamCdnImageResizer streamCdnImageResizer)

        Sets the strategy for resizing images hosted on Stream's CDN. Defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP. Set it to NoOpStreamCdnImageResizer to disable resizing. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.

      • getPollsConfig

         final static PollsConfig getPollsConfig()

        Configuration for poll creation features. Controls which poll features are configurable by the user and their default values.

      • setPollsConfig

         final static Unit setPollsConfig(PollsConfig pollsConfig)

        Configuration for poll creation features. Controls which poll features are configurable by the user and their default values.