Profile module
#
Get User profile dataTo get the profile data of a user(not a group) call the below method.
Refer this doc to know more about ProfileData Class
Argument | Type | Description |
---|---|---|
jid | String | Jid of the user |
fromserver | boolean | true to fetch from server |
saveasfriend | boolean | if true the user will be saved as friend and will be available in contact list |
#
Update User profileTo update your profile call the below method.
info
In profile object for image property set the absolute file path of a file if a image file needs to be uploaded or else set it to profile image id.
Refer this doc to know more about Profile Class
Argument | Data type | Description |
---|---|---|
name | String | name of the user |
String | email id of the user | |
mobile | String | mobile number of the user |
status | String | status of the user |
image | String | image url of the user |
#
Update profile imageTo update your profile image call the below method.
Argument | Type | Description |
---|---|---|
imagePath | String | file path of the profile image |
info
To fetch the image use {"Authorization": 'token'}
in http header. if you get 401
error on fetching then call below method to refresh auth token and update the header. initialy you will get the token from registration
response.
#
Refresh token for Profile imageTo refresh token for profile image call the below method.
#
Remove profile imageTo remove your profile image call the below method.
#
All the contact related operation will be found below.#
Block a UserTo block a user call the below method.
Argument | Type | Description |
---|---|---|
userJID | String | JID of the user to Block |
#
Unblock a UserTo unblock a user who is blocked already call the below method.
Argument | Type | Description |
---|---|---|
userJID | String | JID of the user to unBlock |
caution
Blocking and Unblocking valid for Single chat user only not for Group/Broadcast.
#
Get user profiles that you blockedTo get the list of chat user profiles that you blocked call the below method.
Argument | Type | Description | |
---|---|---|---|
server | boolean | true to get the synced list from server false to get the list from local data. |
Note : To make server call internet connection is required
#
Get current User busy statusUser can get their current user busy status using the below method.
#
Get the list of User saved profile statusesUser can get their list of previously saved user statuses by calling the below method.
info
This list also contains some pre defined values.
#
Insert User Default StatusUser can insert the default status to get status list from getProfileStatusList()
.
Argument | Type | Description |
---|---|---|
status | String | Status text cannot be longer than 140 characters |
#
Set User statusUser can set the status for their profile using the below method.
Argument | Type | Description |
---|---|---|
status | String | Status text cannot be longer than 140 characters |
statusId | String | id of the Status |
#
Get the list of User saved busy statusesUser can get their list of previously saved user busy statuses by calling the below method.
info
This list also contains some pre defined values.
#
Set User Busy statusUser can set the busy status message for their one to one chat conversation using the below method.
Argument | Type | Description |
---|---|---|
busyStatus | String | busy status text cannot be longer than 140 characters |
#
Enable/Disable User Busy statusUser can enable and disable their busy status using the below method.
Argument | Type | Description |
---|---|---|
enable | boolean | true enables busy status and false disables busy status |
#
Check User Busy status is enabledUser can check whether their busy status is enabled or disabled.
#
Delete a user StatusUser can delete their user status by calling the below method.
Argument | Type | Description |
---|---|---|
id | String | id from the profile status |
status | String | status from the profile status |
isCurrentStatus | bool | isCurrentStatus from the profile status |
caution
User cannot delete a status which is currently selected.
#
Delete a user Busy StatusUser can delete their busy status by calling the below method.
Argument | Type | Description |
---|---|---|
id | String | id from the busy status |
status | String | status from the busy status |
isCurrentStatus | bool | isCurrentStatus from the busy status |
caution
User cannot delete a busy status which is currently selected.
#
Enable disable hide seen statusHide Last seen status enables the user's last logged in time unavailable to their friends. To enable or disable the hide last seen status of the user call the below method.
Argument | Type | Description |
---|---|---|
enable | boolean | true enables the last seen available to friends false disables it |
#
Check last seen statusTo check whether last seen status is available to friends or not, call the below method.