Class documentation

There are few model class which defines and strucures the enity which are used in this SDK.

RecentChat Class#

RecentChat model class was used to get recent chat info of user/group with whom we made conversation.

PropertyTypeDescription
jidStringUnique Identifier of a user
nickNameStringNickname(Name saved in your contacts) of the user
profileNameStringName of the user in server he added during registration
profileImageStringdisplay image url of the user
profileThumbImageStringdisplay thumbnail image url of the user
isGroupbooleanCheck whether the entity belongs to a single chat user or a group
isBroadCastbooleanCheck whether the entity belongs to a single chat user or a broadcast
unreadMessageCountintholds the value of unread messages count for that
isChatPinnedbooleanChecks whether this recent chat model is a pinned to appear at top
isChatArchivedbooleanCheck whether the chat user/group is archived or not
lastMessageIdStringhold the id of the last message in conversation with the user/group
lastMessageStatusStringhold the status of last message
lastMessageContentStringif the last message is text or image with caption then the text or caption will be available in this property
lastMessageTimeLongtime in microseconds of the last last message in conversation with the user/group
lastMessageTypeStringholds the value of message type of the last message in conversation with the user/group
isLastMessageSentByMebooleanChecks whether the last message in conversation is sent by me
isLastMessageRecalledByUserbooleanChecks whether the last message in conversation was recalled(deleted) by the user(contact)
isMutedbooleanChecks whether we muted the user/group
isBlockedbooleansays whether we blocked this user or not
isBlockedMebooleansays whether the user(contact) blocked us or not
isConversationUnReadbooleancheks whether the conversation has unread messages or not
isItSavedContactbooleanChecks whether this this user is saved in our phone contact book or not
isGroupInOfflineModebooleanChecks whether the group was created in server or not
If not made a conversation with a user then null object will be

returned for that user if queried.

ProfileDetails Class#

ProfileDetails model class was used to get info of a user/group.

PropertyTypeDescription
jidStringUnique Identifier of a user
nameStringName of the user
imageStringdisplay image url of the user
thumbImageStringdisplay thumbnail image url of the user
mobileNumberStringmobile number of the user
nickNameStringNickname(Name saved in your contacts) of the user
statusStringStatus of the user
emailStringEmail of the user
isMutedbooleanChecks whether we muted the user/group
isBlockedByAdminbooleansays whether we blocked this user or not
isBlockedMebooleansays whether the user(contact) blocked us or not
isItSavedContactbooleanChecks whether this this user is saved in our phone contact book or not
profileChatTypeChatTypeEnumChecks whether this is a group profile or user profile
groupCreatedTimeStringHolds the date of the created time of the group
isGroupInOfflineModebooleanChecks whether the group was created in server or not

Profile Class#

Profile model class was used to update the profile of a user.

PropertyTypeDescription
jidStringUnique Identifier of a user
nameStringName of the user
imageStringdisplay image url of the user
mobileNumberStringmobile number of the user
statusStringStatus of the user
emailStringEmail of the user

ProfileStatus Class#

ProfileStatus model class was used to get/update the status of the user.

PropertytypeDescription
idLongUnique Identifierfor the status
statusStringHolds the value of the status
isCurrentStatusbooleanchecks whether the status object is the currently selected one

BusyStatus Class#

BusyStatus model class was used to get/update the busy status of the user.

PropertyTypeDescription
idLongUnique Identifierfor the busy status
statusStringHolds the value of the busy status
isCurrentStatusbooleanchecks whether the busy status object is the currently selected one

MessageStatusDetail Class#

MessageStatusDetail model class was used to provide the message status of message for each user in a group.

PropertyTypeDescription
messageIdStringid of the message for which this status model belongs to
userJidStringJid of the user to whom the message was sent
statusMessageStatusholds different message status like delivered, seen ,sent ,Acknowledged
timeStringtime in string
memberProfileDetailsProfileDetailsporfile detail of the user to whom the message was sent

MessageStatus Class#

MessageStatus model class was used to denote the status of a message. It is implemented as a sealed class in kotlin.

PropertyTypeDescription
SENTMessageStatusmessage not yet received by the chat server
ACKNOWLEDGEDMessageStatusmessage received by the chat server
DELIVEREDMessageStatusmessage was delivered to the receiver
SEENMessageStatusthe receiver user saw the message

ChatMessage Class#

ChatMessage model class was used to define a message structure.

PropertyTypeDescription
messageIdStringUnique Id of a ChatMessage
messageTextContentStringText content of the message if it was available
messageSentTimelongPosted time of the message
senderUserNameStringName of the user in server he added during registration
senderNickNameStringName of the Chat user in your phone book if contact sync is enabled
senderUserJidStringJid of the sender if it is a group
chatUserJidStringJid of the chat user/group
messageTypeMessageTypeType of the message
messageChatTypeChatTypeEnumType of chat that the message belongs to
messageStatusMessageStatusStatus of the message
isMessageSentByMebooleantrue if message was sent by you
isItCarbonMessagebooleantrue if the message is sent by you from another resource like web/pc
isMessageStarredbooleantrue if you starred/favourite the message
isMessageDeletedbooleantrue if the message was deleted locally
isMessageRecalledbooleantrue if the message was deleted by the sender
isMessageTranslatedbooleantrue if the message was translated
translatedMessageTextContentStringtranslated text will be available here if translated
contactChatMessageContactChatMessagethe receiver user saw the message
locationChatMessageLocationChatMessageHolds the location data if this is a location message
mediaChatMessageMediaChatMessageHolds the media details if this is a media message
contactChatMessageContactChatMessagethe receiver user saw the message
isThisAReplyMessagebooleantrue if this is a reply to another message
replyParentChatMessageReplyParentChatMessageHold the necessary data of the original parent message to which this message is a reply

ReplyParentChatMessage Class#

ReplyParentChatMessage model class was used to provide necessary data for parent message to which a message was a reply.

PropertyTypeDescription
messageIdStringId of the message
messageTypeMessageTypeType of the message
chatUserJidStringJid of the message sender user
messageSentTimelongPosted time of the message
isMessageSentByMebooleantrue if message was sent by you
senderUserNameStringName of the user in server he added during registration
senderNickNameStringName of the Chat user in your phone book if contact sync is enabled
isMessageStarredbooleantrue if you starred/favourite the message
isMessageDeletedbooleantrue if the message was deleted locally
isMessageRecalledbooleantrue if the message was deleted by the sender
messageTextContentStringText content of the message if it was available
contactChatMessageContactChatMessagethe receiver user saw the message
locationChatMessageLocationChatMessageHolds the location data if this is a location message
mediaChatMessageMediaChatMessageHolds the media details if this is a media message

ContactChatMessage Class#

ContactChatMessage model class defines the structure of a Contact message.

PropertyTypeDescription
messageIdStringId of the message
contactNameStringName of the contact f
contactPhoneNumbersList<String>List of phone numbers available for the contact
isChatUserList<Boolean>List of boolean values to show whether the phone number in the same index of contactPhoneNumbers is a chatUser or not

LocationChatMessage Class#

LocationChatMessage model class defines the structure of a Location message.

PropertyTypeDescription
messageIdStringId of the message
latitudedoubleLatitude of the location
longitudedoubleLongitude of the location
mapLocationUrlStringUrl to go to a map for the location

MediaChatMessage Class#

MediaChatMessage model class defines the structure of a Media message.

PropertyTypeDescription
messageIdStringId of the message
mediaFileNameStringame of the media file
mediaDurationlongDuration of the media file if its a audio/video
messageTypeMessageTypeType of the message
mediaFileSizelongSize of the media file
mediaFileTypeStringType of the file
mediaUploadStatusintUpload status of the media file
mediaDownloadStatusintDownload status of the media file
mediaLocalStoragePathStringLocal path in which the media file resides if its available
mediaThumbImageStringBase64 thumbnail image string if it is a video/image
mediaCaptionTextStringHolds the caption if one provided
mediaProgressStatusintProgress of the upload/download media file

MediaData struct#

MediaData struct holds the metadata information required to send the Media messages

PropertyTypeDescription
fileNameStringName of the file
fileURLURLURL of the media file
fileSizeDoubleSize of the file in bytes
durationDoubleDuration of the media file if its an audio or video
base64ThumbnailStringbase64 representation of the image or video's thumbnail
fileKeyStringKey for the media file if its encrypted
mediaTypeMediaTypeType of the media file
captionStringCaption for the media file

MediaType enum#

MediaType enum holds the case of media attachments that can be sent in the SDK.

CaseDescription
imageImage file
videoVideo file
audioAudio file
documentDocument file

MediaQuality enum#

MediaQuality enum defines the quality of compression imposed on media files during compression.

CaseDescription
bestFile compressed to best qulity
highFile compressed to high qulity
mediumFile compressed to medium qulity
lowFile compressed to lowest qulity
uncompressedFile will be uncompressed

MediaStatus enum#

Validates the status of the current video processing.

CaseDescription
processingVideo processing is in progress
successVideo processing completed
failedVideo processing failed

ChatDataModel struct#

ChatDataModel struct holds the chat data to share in email

PropertyTypeDescription
subjectStringsubject to email
messageContentStringcontent to email
mediaAttachmentsUrl[URL]list of media urls including text file url which has chat conversation history to share in email

SearchMessage struct#

Search message defines the search result

PropertyTypeDescription
messageIdStringId of the message
chatUserJidStringJid of the chat user/group

ChatTagsModel struct#

ChatTagsModel struct holds the chat tag data.

PropertyTypeDescription
tagIdStringId of the chat tag
tagnameStringName of the chat tag
taginfoStringInformation of the chat tag
isRecommentedTagbooleanIdentify Recommented tag or not
memberIdList[String]list of member ids going to add in chat tag
currentUserIdStringUnique Identifier of a user