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
rowIdStringrowId of the recent chat which is used for pagination by passing last recentChat rowId from fetched data
metaDataList<MessageMetaData>Hold the metaData list of the recent chat.
topicIDStringTopic ID to be sent
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
isGroupAdminbooleanChecks whether this user is the admin of this group
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

MessageType Class#

MessageType model class was used to denote the type of the message.

PropertyTypeDescription
TEXTStringThis indicates this message is Text Message
IMAGEStringThis indicates this message is Image Message
AUDIOStringThis indicates this message is Audio Message
AUDIO_RECORDEDStringThis indicates this message is Audio Recorded Message
VIDEOStringThis indicates this message is Video Message
CONTACTStringThis indicates this message is Contact Message
DOCUMENTStringThis indicates this message is Document Message
LOCATIONStringThis indicates this message is Location Message
NOTIFICATIONStringThis indicates this message is Notification Message
MEETStringThis indicates this message is Meet Message

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
RECEIVEDMessageStatusthe message is received from the server and not sent by current 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
senderProfileImageStringImage url of the Chat user
contactTypeContactTypeContact type of the user
isItSavedContactbooleanChecks whether this this user is saved in our phone contact book or not
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
metaDataList<MessageMetaData>Hold the metaData list of the message.
topicIDStringTopic ID to be sent
isEditedbooleantrue if the message was edited

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
mediaFileUrlStringUrl of the media file
mediaFileTypeStringType of the file
mediaFileWidthintWidth of image/video file
mediaFileHeightintHeight of image/video file
isAudioRecordedBooleanThis indicates audio file is recorded or not
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

TextMessage Class#

TextMessage object allows several types of parameters that you can configure to customize text messages as mentioned below.

PropertyTypeDescription
toIdStringjid of the end user/group
messageTextStringmessage content to be sent
replyMessageIdStringif it is a reply message for message A, then message A's messageId
mentionedUsersIdsList<String>list of userId to mention specific users while sending a group message
metaDataList<MessageMetaData>metaData is an optional parameter to provide MetaData of Message. Maximum size is 3 and values should be string
topicIDStringTopic ID to be sent

FileMessage Class#

FileMessage object allows several types of parameters that you can configure to customize file messages as mentioned below.

PropertyTypeDescription
toIdStringjid of the end user/group
replyMessageIdStringif it is a reply message for message A, then message A's messageId
mentionedUsersIdsList<String>list of userId to mention specific users while sending a group message
messageTypeMessageTypeType of the message to be sent
locationMessageLocationMessageParamsObject hold the parameters of the location message
contactMessageContactMessageParamsObject hold the parameters of the contact message
fileMessageFileMessageParamsObject hold the parameters of the file message
metaDataList<MessageMetaData>metaData is an optional parameter to provide MetaData of Message. Maximum size is 3 and values should be string
topicIDStringTopic ID to be sent

LocationMessageParams Class#

LocationMessageParams object hold the parameters required to send the locations message.

PropertyTypeDescription
latitudeDoubleLatitude of the location
longitudeDoubleLongitude of the location

ContactMessageParams Class#

ContactMessageParams object hold the parameters required to send the contact message.

PropertyTypeDescription
nameStringName of the contact
numbersList<String>Contact numbers of the contact

FileMessageParams Class#

MediaMessageParams object hold the parameters required to send the file message.

PropertyTypeDescription
fileFileFile object to be uploaded
captionStringCaption of the Image/Video file
localFilePathStringLocal path of the uploaded media file in the device
thumbImageStringbase64 string representation of the image or video's thumbnail
fileSizeLongSize of the uploaded media file in bytes
durationLongDuration of the uploaded media file if its an audio or video
fileUrlStringURL of the uploaded media file
fileNameStringName of the uploaded media file

ChatTagModel Class#

ChatTagsModel struct holds the chat tag data.

PropertyTypeDescription
tagIdStringId of the chat tag
tagnameStringName of the chat tag
taginfoStringInformation of the chat tag
isRecommentedTagbooleanIdentify Recommended tag or not
memberIdListArrayList<String>list of member ids going to add in chat tag
currentUserIdStringUnique Identifier of a user
orderIntorder or position of the chatTag

MetaData Class#

metadata information required to send the Register

PropertyTypeDescription
keyStringName of the key
valueStringName of the value

MetaDataUserList Class#

MetaDataUserList model class was used to get the usersList.

PropertyTypeDescription
keyStringName of the key
valueList<String>List of the value

MessageMetaData Class#

MessageMetaData information required to send in the Message

PropertyTypeDescription
keyStringName of the key
valueStringName of the value

MetaDataMessageList Class#

The MetaDataMessageList model class was used to retrieve the Messages that contains metadata.

PropertyTypeDescription
keyStringName of the key
valueList<String>List of the value

EditMessage Class#

EditMessage object hold the parameter requred to Edit the Existing Message.

PropertyTypeDescription
messageIdStringid of the message
editedTextContentStringedited content to be sent
mentionedUsersIdsList<String>list of userId to be mentioned specific users in the edited message