use of com.fanap.podchat.requestobject.RequestThreadParticipant in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method getThreadParticipants.
private void getThreadParticipants() {
RequestThreadParticipant request = new RequestThreadParticipant.Builder().count(20).offset(0).threadId(TEST_THREAD_ID).build();
presenter.getThreadParticipant(request);
// presenter.getThreadParticipant(20, null, TEST_THREAD_ID, new ChatHandler() {
// @Override
// public void onGetThreadParticipant(String uniqueId) {
// super.onGetThreadParticipant(uniqueId);
// }
// });
}
use of com.fanap.podchat.requestobject.RequestThreadParticipant in project pod-chat-android-sdk by FanapSoft.
the class ChatPresenter method getThreadParticipant.
@Override
public void getThreadParticipant(int count, Long offset, long threadId, ChatHandler handler) {
RequestThreadParticipant participant = new RequestThreadParticipant.Builder(threadId).count(50).offset(0).build();
chat.getThreadParticipants(participant, handler);
// chat.getThreadParticipants(count, offset, threadId, handler);
}
use of com.fanap.podchat.requestobject.RequestThreadParticipant in project pod-chat-android-sdk by FanapSoft.
the class AssistantCacheTest method populateParticipantList.
@Test
public void populateParticipantList() {
populateThreadsListFromServerOnly();
assert threads.size() > 0;
Thread thread = getValidGroupThread();
chatListeners = new ChatListener() {
@Override
public void onGetThreadParticipant(String content, ChatResponse<ResultParticipant> response) {
System.out.println("Received Participant, Cache: " + response.isCache() + " Content: " + content);
if (response.getResult().getParticipants().size() > 1) {
threadParticipant.addAll(response.getResult().getParticipants());
chat.removeListener(chatListeners);
resumeProcess();
} else {
threads.remove(thread);
Thread t2 = getValidGroupThread();
print("try again changing thread...");
RequestThreadParticipant request = new RequestThreadParticipant.Builder().threadId(t2.getId()).build();
chat.getThreadParticipants(request, null);
}
}
};
chat.addListener(chatListeners);
RequestThreadParticipant request = new RequestThreadParticipant.Builder().threadId(thread.getId()).build();
chat.getThreadParticipants(request, null);
pauseProcess();
}
Aggregations