Profile module
Get User profile data#
To get the profile data of a user(not a group) call the below method.
- Java
- Kotlin
Refer this doc to know more about Profile Class
| Argument | Type | Description | 
|---|---|---|
| USER_JID | String | Jid of the user | 
| FETCH_FROM_SERVER | boolean | true to fetch from server | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as as lambda expression | 
Update User profile#
To update your profile call the below method.
- Java
- Kotlin
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 | Description | Data type | 
|---|---|---|
| PROFILE_OBJECT | Profile | Profileobject which the updated value | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as as lambda expression | 
Update profile image#
To update your profile image call the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| PROFILE_IMAGE_FILE | File | file object of the profile image | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
Refer Profile to know more about Profile class.
Remove profile image#
To remove your profile image call the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
All the contact related operation will be found below.
Block a User#
To block a user call the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| JID_TO_BLOCK | String | JIDof the user | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
caution
If block feature unavailable for your plan then it will throw 403 exception.
Unblock a User#
To unblock a user who is blocked already call the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| JID_TO_UNBLOCK | String | JIDof the user | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
caution
Blocking and Unblocking valid for Single chat user only not for Group/Broadcast.
caution
If block feature unavailable for your plan then it will throw 403 exception.
Get user profiles that you blocked#
To get the list of chat user profiles that you blocked call the below method.
- Java
- Kotlin
| Argument | Description | Type | |
|---|---|---|---|
| SERVER_CALL | boolean | trueto get the synced list from serverfalseto get the list from local data. default value isfalse | |
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
Note : To make server call internet connection is required
caution
If block feature unavailable for your plan then it will throw 403 exception.
Get user profiles that blocked you#
To get the list of single chat user that blocked you call the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| SERVER_CALL | boolean | trueto get the synced list from serverfalseto get the list from local data. default value isfalse | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
Note : To make server call internet connection is required
caution
If block feature unavailable for your plan then it will throw 403 exception.
Get Unknown single chat Profiles#
To get the list of single chat user those are not in your contacts if you use phone number as your primary way of communication .
- Java
- Kotlin
Get current User status#
User can get their current user status using the below method.
- Java
- Kotlin
Refer this doc to know more about ProfileStatus Class
Get current User busy status#
User can get their current user busy status using the below method.
- Java
- Kotlin
Refer this doc to know more about BusyStatus Class
Set User status#
User can set the status for their profile using the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| STATUS_TEXT | String | Status text cannot be longer than 140 characters | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
Set User Busy status#
User can set the busy status message for their one to one chat conversation using the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| BUSY_STATUS_TEXT | String | busy status text cannot be longer than 140 characters | 
Enable/Disable User Busy status#
User can enable and disable their busy status using the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| ENABLE_BUSY_STATUS | boolean | trueenables busy status andfalsedisables busy status | 
Check User Busy status is enabled#
User can check whether their busy status is enabled or disabled.
- Java
- Kotlin
Get the list of User saved profile statuses#
User can get their list of previously saved user statuses by calling the below method.
- Java
- Kotlin
info
This list contains some pre defined values.
Get the list of User saved busy statuses#
User can get their list of previously saved user busy statuses by calling the below method.
- Java
- Kotlin
info
This list also contains some pre defined values.
Delete a user Status#
User can delete their user status by calling the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| USER_STATUS | ProfileStatus | Object of the profile status that has to be deleted | 
caution
User cannot delete a status which is currently selected.
Delete a user Busy Status#
User can delete their busy status by calling the below method.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| USER_BUSY_STATUS | BusyStatus | Object of the user busy status that has to be deleted | 
caution
User cannot delete a busy status which is currently selected.
Enable disable hide seen status#
Hide 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.
- Java
- Kotlin
| Argument | Type | Description | 
|---|---|---|
| ENABLE_LAST_SEEN | boolean | trueenables the  last seen available to friendsfalsedisables it | 
| CALLBACK | FlyCallback | FlyCallbackimplemented as lambda expression | 
Check last seen status#
To check whether last seen status is available to friends or not, call the below method.
- Java
- Kotlin