Class documentation

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

RecentChatData 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
isGroupboolCheck whether the entity belongs to a single chat user or a group
isBroadCastboolCheck whether the entity belongs to a single chat user or a broadcast
unreadMessageCountintholds the value of unread messages count for that
isChatPinnedboolChecks whether this recent chat model is a pinned to appear at top
isChatArchivedboolCheck 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
lastMessageTimeinttime in microseconds of the last last message in conversation with the user/group. (DateTime.fromMicrosecondsSinceEpoch(lastMessageTime.toInt()))
lastMessageTypeStringholds the value of message type of the last message in conversation with the user/group
isLastMessageSentByMeboolChecks whether the last message in conversation is sent by me
isLastMessageRecalledByUserboolChecks whether the last message in conversation was recalled(deleted) by the user(contact)
isMutedboolChecks whether we muted the user/group
isBlockedboolsays whether we blocked this user or not
isBlockedMeboolsays whether the user(contact) blocked us or not
isAdminBlockedboolsays whether the user/group blocked by Admin or not
isConversationUnReadboolcheks whether the conversation has unread messages or not
isItSavedContactboolChecks whether this this user is saved in our phone contact book or not
contactTypeStringHolds the value of contact type
isGroupInOfflineModeboolChecks whether the group was created in server or not
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.

ProfileDetail Class#

ProfileDetail 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
mobileNumberStringmobile number of the user
nickNameStringNickname(Name saved in your contacts) of the user
statusStringStatus of the user
emailStringEmail of the user
isMutedboolChecks whether we muted the user/group
isBlockedboolsays whether we blocked this user or not
isBlockedMeboolsays whether the user(contact) blocked us or not
isAdminBlockedboolsays whether the user/group blocked by Admin or not
isItSavedContactboolChecks whether this this user is saved in our phone contact book or not
isGroupProfileboolChecks whether this is a group profile or not
isGroupInOfflineModeboolChecks whether the group was created in server or not
contactTypeStringHolds the value of contact type

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
idStringUnique Identifierfor the status
statusStringHolds the value of the status
isCurrentStatusboolchecks whether the status object is the currently selected one

ContactTypes Definition#

ContactType 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
idStringUnique Identifier for the busy status
statusStringHolds the value of the busy status
isCurrentStatusboolchecks whether the busy status object is the currently selected one

MessageStatus Definition#

MessageStatus was used to denote the status of a message.

PropertyTypeDescription
SENTStringmessage not yet received by the chat server
ACKNOWLEDGEDStringmessage received by the chat server
DELIVEREDStringmessage was delivered to the receiver
SEENStringthe 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
messageSentTimeintPosted time of the message. (DateTime.fromMicrosecondsSinceEpoch(messageSentTime.toInt()))
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
messageTypeStringType of the message
messageChatTypeStringType of chat that the message belongs to
messageStatusStringStatus of the message
isMessageSentByMebooltrue if message was sent by you
isItCarbonMessagebooltrue if the message is sent by you from another resource like web/pc
isMessageStarredbooltrue if you starred/favourite the message
isMessageDeletedbooltrue if the message was deleted locally
isMessageRecalledbooltrue if the message was deleted by the sender
messageCustomFieldMap<String,dynamic>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
isThisAReplyMessagebooltrue if this is a reply to another message
replyParentChatMessageReplyParentChatMessageHold the necessary data of the original parent message to which this message is a reply
metaDataList<MessageMetaData>Hold the metaData list of the message.
topicIDStringTopic ID to be sent
isEditedbooltrue 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
messageTypeStringType of the message
chatUserJidStringJid of the message sender user
messageSentTimeintPosted time of the message. (DateTime.fromMicrosecondsSinceEpoch(messageSentTime.toInt()))
isMessageSentByMebooltrue 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
isMessageStarredbooltrue if you starred/favourite the message
isMessageDeletedbooltrue if the message was deleted locally
isMessageRecalledbooltrue 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
contactPhoneNumbersList<String>List of phone numbers available for the contact
isChatAppUserList<bool>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
mediaDurationintDuration of the media file if its a audio/video
messageTypeStringType of the message
mediaFileSizeintSize 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

MessageParams Class#

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

PropertyTypeDescription
toJidStringjid of the end user/group
replyMessageIdStringif it is a reply message for message A, then message A's messageId
topicIDStringTopic ID to be sent
metaDataList<MessageMetaData>metaData is an optional parameter to provide MetaData of Message. Maximum size is 3 and values should be string
textMessageParamsTextMessageParamsObject hold the parameters of the text message
locationMessageParamsLocationMessageParamsObject hold the parameters of the location message
contactMessageParamsContactMessageParamsObject hold the parameters of the contact message
fileMessageParamsFileMessageParamsObject hold the parameters of the file message

TextMessageParams Class#

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

PropertyTypeDescription
messageTextStringmessage content 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#

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

PropertyTypeDescription
fileFileFile object to be uploaded
captionStringCaption of the Image/Video file
thumbImageStringbase64 string representation of the image or video's thumbnail
fileSizeintSize of the uploaded media file in bytes
durationintDuration of the uploaded media file if its an audio or video
fileNameStringName of the uploaded media file

TopicMetaData Class#

TopicMetaData information used to send the topic based messages

PropertyTypeDescription
keyStringName of the key
valueStringName of the value

FlyResponse Class#

FlyResponse object hold the parameters used for flycallback

PropertyTypeDescription
isSuccessboolcallback success or failure
dataStringjson encode string of the callback data
messageStringto get callback message (optional)
exceptionFlyExceptionto get exception from the callback (optional)

FlyException Class#

FlyException object hold the parameters used for flycallback exception

PropertyTypeDescription
codeStringcode of the error
messageStringerror message
throwabledynamicexception throwable

IdentifierMetaData Class#

metadata information required to send the Register

PropertyTypeDescription
keyStringName of the key
valueStringName 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

EditMessageParams Class#

EditMessageParams object hold the parameter required to Edit the Existing Message.

PropertyTypeDescription
messageIdStringid of the message
editedTextContentStringedited content to be sent