Class documentation
There are few model class which defines and strucures the enity which are used in this SDK.
#
RecentChat ClassRecentChat model class was used to get recent chat info of user/group with whom we made conversation.
Property | Type | Description |
---|---|---|
jid | String | Unique Identifier of a user |
nickName | String | Nickname(Name saved in your contacts) of the user |
profileName | String | Name of the user in server he added during registration |
profileImage | String | display image url of the user |
profileThumbImage | String | display thumbImage url of the user |
isGroup | boolean | Check whether the entity belongs to a single chat user or a group |
isBroadCast | boolean | Check whether the entity belongs to a single chat user or a broadcast |
unreadMessageCount | int | holds the value of unread messages count for that |
isChatPinned | boolean | Checks whether this recent chat model is a pinned to appear at top |
isChatArchived | boolean | Check whether the chat user/group is archived or not |
lastMessageId | String | hold the id of the last message in conversation with the user/group |
lastMessageStatus | String | hold the status of last message |
lastMessageContent | String | if the last message is text or image with caption then the text or caption will be available in this property |
lastMessageTime | Long | time in microseconds of the last last message in conversation with the user/group |
lastMessageType | String | holds the value of message type of the last message in conversation with the user/group |
isLastMessageSentByMe | boolean | Checks whether the last message in conversation is sent by me |
isLastMessageRecalledByUser | boolean | Checks whether the last message in conversation was recalled(deleted) by the user(contact) |
isMuted | boolean | Checks whether we muted the user/group |
isBlocked | boolean | says whether we blocked this user or not |
isBlockedMe | boolean | says whether the user(contact) blocked us or not |
isAdminBlocked | boolean | says whether the user/group blocked by Admin or not |
isConversationUnRead | boolean | cheks whether the conversation has unread messages or not |
isItSavedContact | boolean | Checks whether this this user is saved in our phone contact book or not |
contactType | ContactType | Holds the value of contact type |
isGroupInOfflineMode | boolean | Checks whether the group was created in server or not |
rowId | String | rowId of the recent chat which is used for pagination by passing last recentChat rowId from fetched data |
metaData | List<MessageMetaData> | Hold the metaData list of the recent chat. |
topicID | String | Topic ID to be sent |
If not made a conversation with a user then null object will be
returned for that user if queried.
#
ProfileDetails ClassProfileDetails model class was used to get info of a user/group.
Property | Type | Description |
---|---|---|
jid | String | Unique Identifier of a user |
name | String | Name of the user |
image | String | display image url of the user |
thumbImage | String | display thumbImage url of the user |
mobileNumber | String | mobile number of the user |
nickName | String | Nickname(Name saved in your contacts) of the user |
status | String | Status of the user |
String | Email of the user | |
isMuted | boolean | Checks whether we muted the user/group |
isBlocked | boolean | says whether we blocked this user or not |
isBlockedMe | boolean | says whether the user(contact) blocked us or not |
isAdminBlocked | boolean | says whether the user/group blocked by Admin or not |
isItSavedContact | boolean | Checks whether this this user is saved in our phone contact book or not |
contactType | ContactType | Holds the value of contact type |
isGroupAdmin | boolean | Checks whether this user is the admin of this group |
isGroupProfile | boolean | Checks whether this is a group profile or not |
groupCreatedTime | String | Holds the date of the created time of the group |
isGroupInOfflineMode | boolean | Checks whether the group was created in server or not |
#
Profile ClassProfile model class was used to update the profile of a user.
Property | Type | Description |
---|---|---|
jid | String | Unique Identifier of a user |
name | String | Name of the user |
image | String | display image url of the user |
thumbImage | String | display thumbImage url of the user |
mobileNumber | String | mobile number of the user |
status | String | Status of the user |
String | Email of the user |
#
ProfileStatus ClassProfileStatus model class was used to get/update the status of the user.
Property | type | Description |
---|---|---|
id | Long | Unique Identifierfor the status |
status | String | Holds the value of the status |
isCurrentStatus | boolean | checks whether the status object is the currently selected one |
#
MessageType ClassMessageType model class was used to denote the type of the message.
Property | Type | Description |
---|---|---|
TEXT | String | This indicates this message is Text Message |
IMAGE | String | This indicates this message is Image Message |
AUDIO | String | This indicates this message is Audio Message |
AUDIO_RECORDED | String | This indicates this message is Audio Recorded Message |
VIDEO | String | This indicates this message is Video Message |
CONTACT | String | This indicates this message is Contact Message |
DOCUMENT | String | This indicates this message is Document Message |
LOCATION | String | This indicates this message is Location Message |
NOTIFICATION | String | This indicates this message is Notification Message |
MEET | String | This indicates this message is Meet Message |
#
ContactType ClassContactType model class was used to denote the type of the contact.
Property | Type | Description |
---|---|---|
LIVE_CONTACT | String | Contact saved in our phone contact book and a registered user |
LOCAL_CONTACT | String | Contact saved in our phone contact book and a non registered user |
UNKNOWN_CONTACT | String | Contact not saved in our phone contact book and a registered user |
DELETED_CONTACT | String | Contact was a registered user and the user account was deleted |
#
BusyStatus ClassBusyStatus model class was used to get/update the busy status of the user.
Property | Type | Description |
---|---|---|
id | Long | Unique Identifierfor the busy status |
status | String | Holds the value of the busy status |
isCurrentStatus | boolean | checks whether the busy status object is the currently selected one |
#
MessageStatusDetail ClassMessageStatusDetail model class was used to provide the message status of message for each user in a group.
Property | Type | Description |
---|---|---|
messageId | String | id of the message for which this status model belongs to |
userJid | String | Jid of the user to whom the message was sent |
status | MessageStatus | holds different message status like delivered, seen ,sent ,Acknowledged |
time | String | time in string |
memberProfileDetails | ProfileDetails | porfile detail of the user to whom the message was sent |
#
MessageStatus ClassMessageStatus model class was used to denote the status of a message. It is implemented as a sealed class in kotlin.
Property | Type | Description |
---|---|---|
SENT | MessageStatus | message not yet received by the chat server |
ACKNOWLEDGED | MessageStatus | message received by the chat server |
DELIVERED | MessageStatus | message was delivered to the receiver |
SEEN | MessageStatus | the receiver user saw the message |
RECEIVED | MessageStatus | the message is received from the server and not sent by current user |
#
ChatMessage ClassChatMessage model class was used to define a message structure.
Property | Type | Description |
---|---|---|
messageId | String | Unique Id of a ChatMessage |
messageTextContent | String | Text content of the message if it was available |
messageSentTime | long | Posted time of the message |
senderUserName | String | Name of the user in server he added during registration |
senderNickName | String | Name of the Chat user in your phone book if contact sync is enabled |
senderProfileImage | String | Image url of the Chat user |
contactType | ContactType | Contact type of the user |
isItSavedContact | boolean | Checks whether this this user is saved in our phone contact book or not |
senderUserJid | String | Jid of the sender if it is a group |
chatUserJid | String | Jid of the chat user/group |
messageType | MessageType | Type of the message |
messageChatType | ChatTypeEnum | Type of chat that the message belongs to |
messageStatus | MessageStatus | Status of the message |
isMessageSentByMe | boolean | true if message was sent by you |
isItCarbonMessage | boolean | true if the message is sent by you from another resource like web/pc |
isMessageStarred | boolean | true if you starred/favourite the message |
isMessageDeleted | boolean | true if the message was deleted locally |
isMessageRecalled | boolean | true if the message was deleted by the sender |
messageCustomField | Map<key:String, value:String> | custom value will be available here if added |
contactChatMessage | ContactChatMessage | the receiver user saw the message |
locationChatMessage | LocationChatMessage | Holds the location data if this is a location message |
mediaChatMessage | MediaChatMessage | Holds the media details if this is a media message |
contactChatMessage | ContactChatMessage | the receiver user saw the message |
isThisAReplyMessage | boolean | true if this is a reply to another message |
replyParentChatMessage | ReplyParentChatMessage | Hold the necessary data of the original parent message to which this message is a reply |
mentionedUsersIds | List<ProfileDetails> | Hold the mentioned user's profile details |
metaData | List<MessageMetaData> | Hold the metaData list of the message. |
topicID | String | Topic ID to be sent |
isEdited | boolean | true if the message was edited |
#
ReplyParentChatMessage ClassReplyParentChatMessage model class was used to provide necessary data for parent message to which a message was a reply.
Property | Type | Description |
---|---|---|
messageId | String | Id of the message |
messageType | MessageType | Type of the message |
chatUserJid | String | Jid of the message sender user |
messageSentTime | long | Posted time of the message |
isMessageSentByMe | boolean | true if message was sent by you |
senderUserName | String | Name of the user in server he added during registration |
senderNickName | String | Name of the Chat user in your phone book if contact sync is enabled |
isMessageStarred | boolean | true if you starred/favourite the message |
isMessageDeleted | boolean | true if the message was deleted locally |
isMessageRecalled | boolean | true if the message was deleted by the sender |
messageTextContent | String | Text content of the message if it was available |
contactChatMessage | ContactChatMessage | the receiver user saw the message |
locationChatMessage | LocationChatMessage | Holds the location data if this is a location message |
mediaChatMessage | MediaChatMessage | Holds the media details if this is a media message |
mentionedUsersIds | List<ProfileDetails> | Hold the mentioned user's profile details |
#
ContactChatMessage ClassContactChatMessage model class defines the structure of a Contact message.
Property | Type | Description |
---|---|---|
messageId | String | Id of the message |
contactName | String | Name of the contact f |
contactPhoneNumbers | List<String> | List of phone numbers available for the contact |
isChatUser | List<Boolean> | List of boolean values to show whether the phone number in the same index of contactPhoneNumbers is a chatUser or not |
#
LocationChatMessage ClassLocationChatMessage model class defines the structure of a Location message.
Property | Type | Description |
---|---|---|
messageId | String | Id of the message |
latitude | double | Latitude of the location |
longitude | double | Longitude of the location |
mapLocationUrl | String | Url to go to a map for the location |
#
MediaChatMessage ClassMediaChatMessage model class defines the structure of a Media message.
Property | Type | Description |
---|---|---|
messageId | String | Id of the message |
mediaFileName | String | Name of the media file |
mediaDuration | long | Duration of the media file if its a audio/video |
messageType | MessageType | Type of the message |
mediaFileSize | long | Size of the media file |
mediaFileUrl | String | Url of the media file |
mediaFileType | String | Type of the file |
mediaFileWidth | int | Width of image/video file |
mediaFileHeight | int | Height of image/video file |
isAudioRecorded | Boolean | This indicates audio file is recorded or not |
mediaUploadStatus | int | Upload status of the media file |
mediaDownloadStatus | int | Download status of the media file |
mediaLocalStoragePath | String | Local path in which the media file resides if its available |
mediaThumbImage | String | Base64 thumbnail image string if it is a video/image |
mediaCaptionText | String | Holds the caption if one provided |
mediaProgressStatus | int | Progress of the upload/download media file |
#
TextMessage ClassTextMessage object allows several types of parameters that you can configure to customize text messages as mentioned below.
Property | Type | Description |
---|---|---|
toId | String | jid of the end user/group |
messageText | String | message content to be sent |
replyMessageId | String | if it is a reply message for message A, then message A's messageId |
mentionedUsersIds | List<String> | list of userId to mention specific users while sending a group message |
metaData | List<MessageMetaData> | metaData is an optional parameter to provide MetaData of Message. Maximum size is 3 and values should be string |
topicID | String | Topic ID to be sent |
#
FileMessage ClassFileMessage object allows several types of parameters that you can configure to customize file messages as mentioned below.
Property | Type | Description |
---|---|---|
toId | String | jid of the end user/group |
replyMessageId | String | if it is a reply message for message A, then message A's messageId |
mentionedUsersIds | List<String> | list of userId to mention specific users while sending a group message |
messageType | MessageType | Type of the message to be sent |
locationMessage | LocationMessageParams | Object hold the parameters of the location message |
contactMessage | ContactMessageParams | Object hold the parameters of the contact message |
fileMessage | FileMessageParams | Object hold the parameters of the file message |
metaData | List<MessageMetaData> | metaData is an optional parameter to provide MetaData of Message. Maximum size is 3 and values should be string |
topicID | String | Topic ID to be sent |
#
LocationMessageParams ClassLocationMessageParams object hold the parameters required to send the locations message.
Property | Type | Description |
---|---|---|
latitude | Double | Latitude of the location |
longitude | Double | Longitude of the location |
#
ContactMessageParams ClassContactMessageParams object hold the parameters required to send the contact message.
Property | Type | Description |
---|---|---|
name | String | Name of the contact |
numbers | List<String> | Contact numbers of the contact |
#
FileMessageParams ClassMediaMessageParams object hold the parameters required to send the file message.
Property | Type | Description |
---|---|---|
file | File | File object to be uploaded |
caption | String | Caption of the Image/Video file |
localFilePath | String | Local path of the uploaded media file in the device |
thumbImage | String | base64 string representation of the image or video's thumbnail |
fileSize | Long | Size of the uploaded media file in bytes |
duration | Long | Duration of the uploaded media file if its an audio or video |
fileUrl | String | URL of the uploaded media file |
fileName | String | Name of the uploaded media file |
#
ChatTagModel ClassChatTagsModel struct holds the chat tag data.
Property | Type | Description |
---|---|---|
tagId | String | Id of the chat tag |
tagname | String | Name of the chat tag |
taginfo | String | Information of the chat tag |
isRecommentedTag | boolean | Identify Recommended tag or not |
memberIdList | ArrayList<String> | list of member ids going to add in chat tag |
currentUserId | String | Unique Identifier of a user |
order | Int | order or position of the chatTag |
#
MetaData Classmetadata information required to send the Register
Property | Type | Description |
---|---|---|
key | String | Name of the key |
value | String | Name of the value |
#
MetaDataUserList ClassMetaDataUserList model class was used to get the usersList.
Property | Type | Description |
---|---|---|
key | String | Name of the key |
value | List<String> | List of the value |
#
MessageMetaData ClassMessageMetaData information required to send in the Message
Property | Type | Description |
---|---|---|
key | String | Name of the key |
value | String | Name of the value |
#
MetaDataMessageList ClassThe MetaDataMessageList model class was used to retrieve the Messages that contains metadata.
Property | Type | Description |
---|---|---|
key | String | Name of the key |
value | List<String> | List of the value |
#
EditMessage ClassEditMessage object hold the parameter requred to Edit the Existing Message.
Property | Type | Description |
---|---|---|
messageId | String | id of the message |
editedTextContent | String | edited content to be sent |
mentionedUsersIds | List<String> | list of userId to be mentioned specific users in the edited message |