Package 

Class FileMessage

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum FileMessage.RequestState

      Represents message request state.

      public class FileMessage.Thumbnail

      Represents image thumbnail. Currently this is valid only for image files.Thumbnails can be generated when you send file through sendFileMessage.

      public class FileMessage.ThumbnailSize

      Represents image thumbnail size. Currently this is valid only for image files.Thumbnails can be generated when you send file through sendFileMessage by passing List of this instance.

    • Method Summary

      Modifier and Type Method Description
      String getMessage() Returns message text.Always set to "File Message".
      String getRequestId() Returns a file request ID.
      String getUrl() Returns the file URL.
      String getPlainUrl() Returns the plain file URL, which does not contain getEkey as a parameter.
      String getName() Returns name of the file.
      int getSize() Returns size of the file.
      String getType() Returns the type of the file.
      List<FileMessage.Thumbnail> getThumbnails() Returns the thumbnail information of image file.
      FileMessage.RequestState getRequestState() Returns message request state.
      List<String> getRequestedMentionUserIds() Returns requested mention user ids.
      FileMessageParams getMessageParams() returns FileMessageParams object that used for sending this messageIt's not null when sendingStatus is PENDING or FAILED or CANCELED If else, it will return null
      String toString()
      • Methods inherited from class com.sendbird.android.BaseMessage

        applyParentMessage, applyReactionEvent, applyThreadInfoUpdateEvent, belongsTo, belongsTo, buildFromSerializedData, buildFromSerializedData, clone, equals, getAllMetaArray, getAllMetaArrays, getAppleCriticalAlertOptions, getChannelUrl, getCreatedAt, getCustomType, getData, getErrorCode, getMentionType, getMentionedMessageTemplate, getMentionedUsers, getMessage, getMessageId, getMessageSurvivalSeconds, getMetaArray, getMetaArrays, getOgMetaData, getParentMessage, getParentMessageId, getParentMessageText, getReactions, getSender, getSendingStatus, getThreadInfo, getThreadedMessagesByTimestamp, getUpdatedAt, hashCode, isGroupChannel, isOpenChannel, isOperatorMessage, isReplyToChannel, isResendable, isSilent, serialize, setAppleCriticalAlertOptions
      • Methods inherited from class java.lang.Object

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

      • getMessage

         String getMessage()

        Returns message text.Always set to "File Message".

      • getUrl

         String getUrl()

        Returns the file URL. If the file encryption feature is enabled, the returned url will containencryption key as a parameter.

        If you enabled the file encryption feature and want to cache the file with URL string as akey, it is recommended to use getPlainUrl instead. This is because the URLreturned by this method embeds getEkey, which changes at every login,leading to a frequent cache miss.

      • getPlainUrl

         String getPlainUrl()

        Returns the plain file URL, which does not contain getEkey as a parameter.If the file encryption feature is enabled, you must put getEkey to therequest header with {@value StringSet#user_auth_key} as the key. Otherwise, the server willrefuse the connection.

        Generally, it is recommended to use getUrl to fetch resources, but if you want tocache the file with URL string as a key while enabled the file encryption feature, it isrecommended to use this method instead. This is because the URL returned by this method doesnot embed getEkey, making it a less changing cache key.

      • getSize

         int getSize()

        Returns size of the file.

      • getType

         String getType()

        Returns the type of the file. MIME preferred.

      • getRequestedMentionUserIds

         List<String> getRequestedMentionUserIds()

        Returns requested mention user ids.If sending status is not PENDING or FAILED or CANCELED, empty list will be returned.

      • getMessageParams

        @Nullable() FileMessageParams getMessageParams()

        returns FileMessageParams object that used for sending this messageIt's not null when sendingStatus is PENDING or FAILED or CANCELED If else, it will return null