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
profileTypeChatTypeEnumTypes of profile SingleChat/ Group / 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
lastMessageTypeMessageTypeEnumholds 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
isBlockedByAdminbooleanChecks if contact blocked by admin or not
isDeletedUserbooleanChecks whether the user ideleted their account 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
isMentionedUserbooleanChecks whether the message has mentioned users or not
mentionedUsersIds[String]Hold the mentioned user's Ids
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
isGroupAdminboolenboolean to represent whether this user is one of the admin of a group
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
isSyncNeededbooleanChecks whether group sync is needed or not to get participants from server

Profile Class#

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

PropertyTypeDescription
jidStringUnique Identifier of a user
nameStringName of the user
nickNameStringNick Name 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

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
RECEIVEDMessageStatusmessage was received from other user

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
isReplyMessagebooleantrue if this is a reply to another message
replyParentChatMessageReplyParentChatMessageHold the necessary data of the original parent message to which this message is a reply
mentionedUsersIds[String]Hold the mentioned user's Ids

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
messageChatTypemessageChatTypeType 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
contactJidStringJid of the contact if available
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
messageTypeMessageTypeEnumType 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
audioTypeAudioTypeEnumChecks whether audio is recorded or not

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
mentionedUsersIds[String]Hold the mentioned user's Ids

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

UnsentMessage struct#

UnsentMessage struct holds the data which is not sent yet but typed can be saved

PropertyTypeDescription
textContentStringId of the message
mentionedUsers[String]Jid of the chat user/group
mentionSearch[String]Mention user search characters list
mentionLocation[Int]Mention user search characters range location list
mentionLength[Int]Mention user search characters range length list

MetaData struct#

Metadata information required to send the Register.

PropertyTypeDescription
keyStringKey of the metadata
valueStringValue of the metadata

MetaDataUserList struct#

MetaDataUserList model class was used to get the usersList.

PropertyTypeDescription
keyStringKey of the metadata
value[String]List of the metadata value

MessageType enum#

MessageType enum holds the case of message types that can be sent in the SDK.

CaseDescription
textThis indicates this message is Text Message
locationThis indicates this message is Location Message
contactThis indicates this message is Contact Message
imageThis indicates this message is Image Message
videoThis indicates this message is Video Message
audioThis indicates this message is Audio Message
audioRecordedThis indicates this message is Recorded Audio Message
documentThis indicates this message is Document Message
notificationThis indicates this message is Notification Message