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 thumbImage 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
isAdminBlockedbooleansays whether the user/group blocked by Admin 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
contactTypeContactTypeHolds the value of contact type
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 thumbImage 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
isBlockedbooleansays whether we blocked this user or not
isBlockedMebooleansays whether the user(contact) blocked us or not
isAdminBlockedbooleansays whether the user/group blocked by Admin or not
isItSavedContactbooleanChecks whether this this user is saved in our phone contact book or not
contactTypeContactTypeHolds the value of contact type
isGroupProfilebooleanChecks whether this is a group profile or not
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
thumbImageStringdisplay thumbImage 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

ContactType Class#

ContactType model class was used to denote the type of the contact.

PropertyTypeDescription
LIVE_CONTACTStringContact saved in our phone contact book and a registered user
LOCAL_CONTACTStringContact saved in our phone contact book and a non registered user
UNKNOWN_CONTACTStringContact not saved in our phone contact book and a registered user
DELETED_CONTACTStringContact was a registered user and the user account was deleted

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
messageCustomFieldMap<key:String, value:String>custom value will be available here if added
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
mentionedUsersIdsList<ProfileDetails>Hold the mentioned user's profile details

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
mentionedUsersIdsList<ProfileDetails>Hold the mentioned user's profile details

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
mediaFileNameStringName 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
fileURLStringURL of the media file
fileSizeLongSize of the file in bytes
fileLocalPathStringLocal path of the media file in the device
durationLongDuration of the media file if its an audio or video
base64ThumbnailStringbase64 representation of the image or video's thumbnail
captionStringCaption for the media file