use of com.fanap.podchat.requestobject.RequestGetContact in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method getContact.
@Override
public void getContact() {
if (chat.isChatReady()) {
view.hideFabContactButton();
RequestGetContact request = new RequestGetContact.Builder().count(50).offset(0).build();
callUniqueIds.add(chat.getContacts(request, null));
}
}
use of com.fanap.podchat.requestobject.RequestGetContact in project pod-chat-android-sdk by FanapSoft.
the class IntegrationTest method getContacts.
@Test
public void getContacts() {
chatListeners = new ChatListener() {
@Override
public void onGetContacts(String content, ChatResponse<ResultContact> response) {
System.out.println("Received contact: " + content);
contactContent = content;
resumeProcess();
}
};
chat.addListener(chatListeners);
RequestGetContact request = new RequestGetContact.Builder().count(50).offset(0).build();
chat.getContacts(request, null);
pauseProcess();
System.out.println("Received contact: " + contactContent);
}
use of com.fanap.podchat.requestobject.RequestGetContact in project pod-chat-android-sdk by FanapSoft.
the class ChatPresenter method getContact.
@Override
public void getContact() {
if (chat.isChatReady()) {
view.onLoadingContactsStarted();
RequestGetContact request = new RequestGetContact.Builder().count(50).offset(0).build();
uniqueIds.add(chat.getContacts(request, null));
}
}
use of com.fanap.podchat.requestobject.RequestGetContact in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method getContacts.
private void getContacts() {
new Thread(() -> {
RequestGetContact request = new RequestGetContact.Builder().count(50).offset(0).build();
// presenter.getContact(0, 0L, null);
presenter.getContact(request);
}).start();
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
new Thread(() -> {
RequestGetContact request2 = new RequestGetContact.Builder().count(10).offset(0).build();
// presenter.getContact(0, 0L, null);
presenter.getContact(request2);
// offset = offset + 50;
}).start();
}
use of com.fanap.podchat.requestobject.RequestGetContact in project pod-chat-android-sdk by FanapSoft.
the class ContactCacheTest method populateContactsFromServer.
public void populateContactsFromServer() {
chatListeners = new ChatListener() {
@Override
public void onGetContacts(String content, ChatResponse<ResultContact> response) {
if (!response.isCache()) {
System.out.println("Received List: " + content);
serverContacts.addAll(response.getResult().getContacts());
chat.removeListener(chatListeners);
resumeProcess();
}
}
};
chat.setListener(chatListeners);
RequestGetContact request = new RequestGetContact.Builder().count(50).offset(0).build();
chat.getContacts(request, null);
pauseProcess();
System.out.println("Received List: " + serverContacts.size());
}
Aggregations