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.
| 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 thumbnail image 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 | 
| profileType | ChatTypeEnum | Types of profile SingleChat/ Group / 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 | MessageTypeEnum | 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 | 
| isConversationUnRead | boolean | cheks whether the conversation has unread messages or not | 
| isBlockedByAdmin | boolean | Checks if contact blocked by admin or not | 
| isDeletedUser | boolean | Checks whether the user ideleted their account or not | 
| isItSavedContact | boolean | Checks whether this this user is saved in our phone contact book or not | 
| isGroupInOfflineMode | boolean | Checks whether the group was created in server or not | 
| isMentionedUser | boolean | Checks 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.
| 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 thumbnail image 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 | 
| isBlockedByAdmin | boolean | says whether we blocked this user or not | 
| isBlockedMe | boolean | says whether the user(contact) blocked us or not | 
| isItSavedContact | boolean | Checks whether this this user is saved in our phone contact book or not | 
| isGroupAdmin | boolen | boolean to represent whether this user is one of the admin of a group | 
| profileChatType | ChatTypeEnum | Checks whether this is a group profile or user profile | 
| groupCreatedTime | String | Holds the date of the created time of the group | 
| isGroupInOfflineMode | boolean | Checks whether the group was created in server or not | 
| isSyncNeeded | boolean | Checks 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.
| Property | Type | Description | 
|---|---|---|
| jid | String | Unique Identifier of a user | 
| name | String | Name of the user | 
| nickName | String | Nick Name of the user | 
| image | String | display image url of the user | 
| mobileNumber | String | mobile number of the user | 
| status | String | Status of the user | 
| String | Email of the user | 
ProfileStatus Class#
ProfileStatus 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 | 
BusyStatus Class#
BusyStatus 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 | 
MessageStatus Class#
MessageStatus 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 | message was received from other user | 
ChatMessage Class#
ChatMessage 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 | 
| 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 | 
| isMessageTranslated | boolean | true if the message was translated | 
| translatedMessageTextContent | String | translated text will be available here if translated | 
| 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 | 
| isReplyMessage | 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 | [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.
| Property | Type | Description | 
|---|---|---|
| messageId | String | Id of the message | 
| messageChatType | messageChatType | 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 | 
ContactChatMessage Class#
ContactChatMessage model class defines the structure of a Contact message.
| Property | Type | Description | 
|---|---|---|
| messageId | String | Id of the message | 
| contactName | String | Name of the contact | 
| contactJid | String | Jid of the contact if available | 
| 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 Class#
LocationChatMessage 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 Class#
MediaChatMessage model class defines the structure of a Media message.
| Property | Type | Description | 
|---|---|---|
| messageId | String | Id of the message | 
| mediaFileName | String | ame of the media file | 
| mediaDuration | long | Duration of the media file if its a audio/video | 
| messageType | MessageTypeEnum | Type of the message | 
| mediaFileSize | long | Size of the media file | 
| mediaFileType | String | Type of the file | 
| 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 | 
| audioType | AudioTypeEnum | Checks whether audio is recorded or not | 
MediaData struct#
MediaData struct holds the metadata information required to send the Media messages
| Property | Type | Description | 
|---|---|---|
| fileName | String | Name of the file | 
| fileURL | URL | URL of the media file | 
| fileSize | Double | Size of the file in bytes | 
| duration | Double | Duration of the media file if its an audio or video | 
| base64Thumbnail | String | base64 representation of the image or video's thumbnail | 
| fileKey | String | Key for the media file if its encrypted | 
| mediaType | MediaType | Type of the media file | 
| caption | String | Caption 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.
| Case | Description | 
|---|---|
| image | Image file | 
| video | Video file | 
| audio | Audio file | 
| document | Document file | 
MediaQuality enum#
MediaQuality enum defines the quality of compression imposed on media files during compression.
| Case | Description | 
|---|---|
| best | File compressed to best qulity | 
| high | File compressed to high qulity | 
| medium | File compressed to medium qulity | 
| low | File compressed to lowest qulity | 
| uncompressed | File will be uncompressed | 
MediaStatus enum#
Validates the status of the current video processing.
| Case | Description | 
|---|---|
| processing | Video processing is in progress | 
| success | Video processing completed | 
| failed | Video processing failed | 
ChatDataModel struct#
ChatDataModel struct holds the chat data to share in email
| Property | Type | Description | 
|---|---|---|
| subject | String | subject to email | 
| messageContent | String | content 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
| Property | Type | Description | 
|---|---|---|
| messageId | String | Id of the message | 
| chatUserJid | String | Jid of the chat user/group | 
ChatTagsModel struct#
ChatTagsModel 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 Recommented tag or not | 
| memberIdList | [String] | list of member ids going to add in chat tag | 
| currentUserId | String | Unique Identifier of a user | 
UnsentMessage struct#
UnsentMessage struct holds the data which is not sent yet but typed can be saved
| Property | Type | Description | 
|---|---|---|
| textContent | String | Id 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.
| Property | Type | Description | 
|---|---|---|
| key | String | Key of the metadata | 
| value | String | Value of the metadata | 
MetaDataUserList struct#
MetaDataUserList model class was used to get the usersList.
| Property | Type | Description | 
|---|---|---|
| key | String | Key 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.
| Case | Description | 
|---|---|
| text | This indicates this message is Text Message | 
| location | This indicates this message is Location Message | 
| contact | This indicates this message is Contact Message | 
| image | This indicates this message is Image Message | 
| video | This indicates this message is Video Message | 
| audio | This indicates this message is Audio Message | 
| audioRecorded | This indicates this message is Recorded Audio Message | 
| document | This indicates this message is Document Message | 
| notification | This indicates this message is Notification Message |