Search in sources :

Example 1 with StatusPingRequest

use of com.fanap.podchat.chat.ping.request.StatusPingRequest in project pod-chat-android-sdk by FanapSoft.

the class ChatPresenter method getContact.

@Override
public void getContact(RequestGetContact request) {
    chat.getContacts(request, null);
    StatusPingRequest statusRequest = new StatusPingRequest.Builder().inContactsList().build();
    chat.sendStatusPing(statusRequest);
}
Also used : StatusPingRequest(com.fanap.podchat.chat.ping.request.StatusPingRequest)

Example 2 with StatusPingRequest

use of com.fanap.podchat.chat.ping.request.StatusPingRequest in project pod-chat-android-sdk by FanapSoft.

the class ChatPresenter method getThreads.

@Override
public void getThreads(RequestThread requestThread, ChatHandler handler) {
    chat.getThreads(requestThread, handler);
    StatusPingRequest statusRequest = new StatusPingRequest.Builder().inChat().build();
    chat.sendStatusPing(statusRequest);
// try {
// Thread.sleep(2000);
// } catch (InterruptedException ignored) {}
// 
// RequestGetUnreadMessagesCount req = new RequestGetUnreadMessagesCount
// .Builder()
// .withMuteThreads()
// .build();
// 
// chat.getAllUnreadMessagesCount(req);
}
Also used : StatusPingRequest(com.fanap.podchat.chat.ping.request.StatusPingRequest)

Example 3 with StatusPingRequest

use of com.fanap.podchat.chat.ping.request.StatusPingRequest in project pod-chat-android-sdk by FanapSoft.

the class ChatPresenter method getHistory.

@Override
public String getHistory(RequestGetHistory request, ChatHandler handler) {
    String uniqueId = chat.getHistory(request, handler);
    StatusPingRequest statusRequest = new StatusPingRequest.Builder().inThread().setThreadId(request.getThreadId()).build();
    chat.sendStatusPing(statusRequest);
    return uniqueId;
}
Also used : StatusPingRequest(com.fanap.podchat.chat.ping.request.StatusPingRequest)

Example 4 with StatusPingRequest

use of com.fanap.podchat.chat.ping.request.StatusPingRequest in project pod-chat-android-sdk by FanapSoft.

the class CallPresenter method getContact.

@Override
public void getContact(RequestGetContact request) {
    chat.getContacts(request, null);
    StatusPingRequest statusRequest = new StatusPingRequest.Builder().inContactsList().build();
    chat.sendStatusPing(statusRequest);
}
Also used : StatusPingRequest(com.fanap.podchat.chat.ping.request.StatusPingRequest) GsonBuilder(com.google.gson.GsonBuilder)

Aggregations

StatusPingRequest (com.fanap.podchat.chat.ping.request.StatusPingRequest)4 GsonBuilder (com.google.gson.GsonBuilder)1