use of com.fanap.podchat.chat.tag.result_model.TagResult in project pod-chat-android-sdk by FanapSoft.
the class TagCacheTest method editTag.
public void editTag(long tagId) {
chatListeners = new ChatListener() {
@Override
public void onTagEdited(String content, ChatResponse<TagResult> response) {
chat.removeListener(chatListeners);
resumeProcess();
}
};
chat.setListener(chatListeners);
EditTagRequest request = new EditTagRequest.Builder(tagId, "EditedTag_" + System.currentTimeMillis()).build();
chat.editTag(request);
pauseProcess();
System.out.println("Tag Edited: ");
}
use of com.fanap.podchat.chat.tag.result_model.TagResult in project pod-chat-android-sdk by FanapSoft.
the class TagManager method prepareTagResponse.
public static ChatResponse<TagResult> prepareTagResponse(ChatMessage chatMessage) {
TagVo tag = App.getGson().fromJson(chatMessage.getContent(), TagVo.class);
TagResult tagResult = new TagResult(tag);
ChatResponse<TagResult> finalResponse = new ChatResponse<>();
finalResponse.setResult(tagResult);
finalResponse.setUniqueId(chatMessage.getUniqueId());
finalResponse.setSubjectId(chatMessage.getSubjectId());
return finalResponse;
}
use of com.fanap.podchat.chat.tag.result_model.TagResult in project pod-chat-android-sdk by FanapSoft.
the class TagCacheTest method deleteTag.
public void deleteTag(long tagId) {
chatListeners = new ChatListener() {
@Override
public void onTagDeleted(String content, ChatResponse<TagResult> response) {
chat.removeListener(chatListeners);
resumeProcess();
}
};
chat.setListener(chatListeners);
DeleteTagRequest request = new DeleteTagRequest.Builder(tagId).build();
chat.deleteTag(request);
pauseProcess();
System.out.println("Tag Deleted: ");
}
use of com.fanap.podchat.chat.tag.result_model.TagResult in project pod-chat-android-sdk by FanapSoft.
the class TagCacheTest method addNewTag.
public void addNewTag() {
chatListeners = new ChatListener() {
@Override
public void onTagCreated(String content, ChatResponse<TagResult> response) {
chat.removeListener(chatListeners);
resumeProcess();
tagId = response.getResult().getTag().getTagId();
}
};
chat.setListener(chatListeners);
CreateTagRequest request = new CreateTagRequest.Builder("Tag_" + System.currentTimeMillis() / 1000).build();
chat.createTag(request);
pauseProcess();
System.out.println("New Tag Created: ");
}
Aggregations