public class UserManager extends Object implements ContactsCallback
Modifier and Type | Method and Description |
---|---|
void |
buildContacts()
This method update a list of phoneBook contact that use this chat.
|
void |
create(User user)
This function creates a one user.
|
Cursor |
getAllContactsCursor()
This function returns a cursor with the all contacts.
|
Cursor |
getContactsWithoutChat()
This method returns cursor with contacts that not include in any chat.
|
User |
getMyUser()
This function get the current user.
|
User |
getUserInformationByJid(String jid)
This function user to get user information form it's id.
|
void |
logout(GenericCallback callback)
This method use to logout of the chat.
|
void |
onContactsAvailable(ArrayList<User> currentUsers,
ArrayList<User> newFriends,
ArrayList<User> deleteFriends) |
void |
onError(PushtechError error)
This function execute automatically when the any server request fails.
|
void |
updateProfileImage(File file,
UserProfileCallback callback)
This method use to update your profile image.
|
void |
updateProfileName(String userName,
UserProfileCallback callback)
This method use to update your username.
|
public User getMyUser()
public void logout(GenericCallback callback)
callback
- notify that logout successful correctly.public User getUserInformationByJid(String jid)
jid
- id of the user.public void buildContacts()
public void updateProfileName(String userName, UserProfileCallback callback)
userName
- new username.callback
- public void updateProfileImage(File file, UserProfileCallback callback)
file
- a valid image file.callback
- public Cursor getAllContactsCursor()
public void create(User user)
user
- public Cursor getContactsWithoutChat()
public void onContactsAvailable(ArrayList<User> currentUsers, ArrayList<User> newFriends, ArrayList<User> deleteFriends)
onContactsAvailable
in interface ContactsCallback
public void onError(PushtechError error)
BaseCallback
onError
in interface BaseCallback
error
- this a PushException with the pretty error message.