Search in sources :

Example 11 with RequestConnect

use of com.fanap.podchat.requestobject.RequestConnect in project pod-chat-android-sdk by FanapSoft.

the class CallPresenter method connectToSandbox.

private void connectToSandbox(String token) {
    RequestConnect request = new RequestConnect.Builder(sandBoxSocketAddress, appId, sandBoxServerName, token, sandBoxSSOHost, sandBoxPlatformHost, sandBoxFileServer, podspaceServer).build();
    connect(request);
}
Also used : RequestConnect(com.fanap.podchat.requestobject.RequestConnect)

Example 12 with RequestConnect

use of com.fanap.podchat.requestobject.RequestConnect in project pod-chat-android-sdk by FanapSoft.

the class AssistantCacheTest method createChat.

@Before
public void createChat() {
    view = Mockito.mock(ChatContract.view.class);
    chatActivity = chatActivityRule.getActivity();
    presenter = new ChatPresenter(appContext, view, chatActivity);
    RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, "podSpaceServer").build();
    chatListeners = new ChatListener() {

        @Override
        public void onChatState(String state) {
            if (state.equals(CHAT_READY)) {
                resumeProcess();
            }
        }
    };
    chat.addListener(chatListeners);
    chat.connect(rc);
    chat.isCacheables(CACHE);
    pauseProcess();
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Example 13 with RequestConnect

use of com.fanap.podchat.requestobject.RequestConnect in project pod-chat-android-sdk by FanapSoft.

the class ChatTest method createChat.

@Before
public void createChat() {
    Looper.prepare();
    view = Mockito.mock(ChatContract.view.class);
    chatActivity = chatActivityRule.getActivity();
    presenter = new ChatPresenter(appContext, view, chatActivity);
    RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, "podSpaceServer").build();
    chatListeners = new ChatListener() {

        @Override
        public void onChatState(String state) {
            if (state.equals(CHAT_READY)) {
                resumeProcess();
            }
        }
    };
    chat.addListener(chatListeners);
    chat.connect(rc);
    chat.isCacheables(CACHE);
    pauseProcess();
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Example 14 with RequestConnect

use of com.fanap.podchat.requestobject.RequestConnect in project pod-chat-android-sdk by FanapSoft.

the class ChatTestSandbox method createChat.

@Before
public void createChat() {
    Looper.prepare();
    MockitoAnnotations.initMocks(this);
    RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, "podSpaceServer").build();
    chatListeners = new ChatListener() {

        @Override
        public void onChatState(String state) {
            if (state.equals(CHAT_READY)) {
                resumeProcess();
            }
        }
    };
    chat.addListener(chatListeners);
    chat.connect(rc);
    pauseProcess();
}
Also used : RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Example 15 with RequestConnect

use of com.fanap.podchat.requestobject.RequestConnect in project pod-chat-android-sdk by FanapSoft.

the class ThreadCacheTest method createChat.

@Before
public void createChat() {
    view = Mockito.mock(ChatContract.view.class);
    chatActivity = chatActivityRule.getActivity();
    presenter = new ChatPresenter(appContext, view, chatActivity);
    RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, "podSpaceServer").build();
    chatListeners = new ChatListener() {

        @Override
        public void onChatState(String state) {
            if (state.equals(CHAT_READY)) {
                resumeProcess();
            }
        }
    };
    chat.addListener(chatListeners);
    chat.connect(rc);
    chat.isCacheables(CACHE);
    pauseProcess();
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Aggregations

RequestConnect (com.fanap.podchat.requestobject.RequestConnect)18 ChatListener (com.fanap.podchat.chat.ChatListener)13 Before (org.junit.Before)13 ChatPresenter (com.example.chat.application.chatexample.ChatPresenter)11