Search in sources :

Example 1 with IPodCall

use of com.fanap.podcall.IPodCall in project pod-chat-android-sdk by FanapSoft.

the class Chat method setupCall.

public void setupCall(VideoCallParam videoCallParam, AudioCallParam audioCallParam, ScreenShareParam screenShareParam, CallConfig callConfig) {
    this.localPartnerView = videoCallParam.getCameraPreview();
    callServiceManager = new CallServiceManager(context, callConfig);
    podVideoCall = new PodCallBuilder(context, new IPodCall() {

        @Override
        public void onError(String s) {
            captureError(new PodChatException(s, ChatConstant.ERROR_CODE_CALL_INITIAL_ERROR));
        }

        @Override
        public void onEvent(String s) {
            showLog(s);
        }

        @Override
        public void onCameraReady(PodCall podCall) {
            showLog("Call is ready");
        }

        @Override
        public void onCameraIsNotAvailable(String message) {
            captureError(new PodChatException(ChatConstant.ERROR_CAMERA_NOT_AVAILABLE, ChatConstant.ERROR_CODE_CAMERA_NOT_AVAILABLE));
        }

        @Override
        public void onMicrophoneIsNotAvailable(String message) {
            captureError(new PodChatException(ChatConstant.ERROR_MICROPHONE_NOT_AVAILABLE, ChatConstant.ERROR_CODE_MICROPHONE_NOT_AVAILABLE));
        }

        @Override
        public void onDeviceIsNear() {
            listenerManager.callOnDeviceIsNear();
        }

        @Override
        public void onDeviceGotFar() {
            listenerManager.callOnDeviceGotFar();
        }
    }).setVideoCallParam(videoCallParam).setAudioCallParam(audioCallParam).setScreenShareParam(screenShareParam).build();
    podVideoCall.initial();
}
Also used : CallServiceManager(com.fanap.podchat.call.audio_call.CallServiceManager) PodChatException(com.fanap.podchat.util.PodChatException) PodCallBuilder(com.fanap.podcall.PodCallBuilder) IPodCall(com.fanap.podcall.IPodCall) IPodCall(com.fanap.podcall.IPodCall) PodCall(com.fanap.podcall.PodCall)

Example 2 with IPodCall

use of com.fanap.podcall.IPodCall in project pod-chat-android-sdk by FanapSoft.

the class Chat method setupCall.

public void setupCall(VideoCallParam videoCallParam, AudioCallParam audioCallParam, ScreenShareParam screenShareParam, CallConfig callConfig, List<CallPartnerView> remoteViews) {
    this.localPartnerView = videoCallParam.getCameraPreview();
    this.videoCallPartnerViews = new ArrayList<>(remoteViews);
    callServiceManager = new CallServiceManager(context, callConfig);
    podVideoCall = new PodCallBuilder(context, new IPodCall() {

        @Override
        public void onError(String s) {
            captureError(new PodChatException(s, ChatConstant.ERROR_CODE_CALL_INITIAL_ERROR));
        }

        @Override
        public void onEvent(String s) {
            showLog(s);
        }

        @Override
        public void onCameraReady(PodCall podCall) {
            showLog("Call is ready");
        }

        @Override
        public void onCameraIsNotAvailable(String message) {
            captureError(new PodChatException(ChatConstant.ERROR_CAMERA_NOT_AVAILABLE, ChatConstant.ERROR_CODE_CAMERA_NOT_AVAILABLE));
        }

        @Override
        public void onMicrophoneIsNotAvailable(String message) {
            captureError(new PodChatException(ChatConstant.ERROR_MICROPHONE_NOT_AVAILABLE, ChatConstant.ERROR_CODE_MICROPHONE_NOT_AVAILABLE));
        }

        @Override
        public void onDeviceIsNear() {
            listenerManager.callOnDeviceIsNear();
        }

        @Override
        public void onDeviceGotFar() {
            listenerManager.callOnDeviceGotFar();
        }
    }).setVideoCallParam(videoCallParam).setAudioCallParam(audioCallParam).setScreenShareParam(screenShareParam).build();
    podVideoCall.initial();
}
Also used : CallServiceManager(com.fanap.podchat.call.audio_call.CallServiceManager) PodChatException(com.fanap.podchat.util.PodChatException) PodCallBuilder(com.fanap.podcall.PodCallBuilder) IPodCall(com.fanap.podcall.IPodCall) IPodCall(com.fanap.podcall.IPodCall) PodCall(com.fanap.podcall.PodCall)

Example 3 with IPodCall

use of com.fanap.podcall.IPodCall in project pod-chat-android-sdk by FanapSoft.

the class Chat method setupCall.

@Deprecated
public void setupCall(VideoCallParam videoCallParam, AudioCallParam audioCallParam, List<CallPartnerView> remoteViews) {
    this.localPartnerView = videoCallParam.getCameraPreview();
    this.videoCallPartnerViews = new ArrayList<>(remoteViews);
    podVideoCall = new PodCallBuilder(context, new IPodCall() {

        @Override
        public void onError(String s) {
            captureError(new PodChatException(s, ChatConstant.ERROR_CODE_CALL_INITIAL_ERROR));
        }

        @Override
        public void onEvent(String s) {
            showLog(s);
        }

        @Override
        public void onCameraReady(PodCall podCall) {
            showLog("Camera is ready");
        }
    }).setVideoCallParam(videoCallParam).setAudioCallParam(audioCallParam).build();
    podVideoCall.initial();
}
Also used : PodChatException(com.fanap.podchat.util.PodChatException) PodCallBuilder(com.fanap.podcall.PodCallBuilder) IPodCall(com.fanap.podcall.IPodCall) IPodCall(com.fanap.podcall.IPodCall) PodCall(com.fanap.podcall.PodCall)

Aggregations

IPodCall (com.fanap.podcall.IPodCall)3 PodCall (com.fanap.podcall.PodCall)3 PodCallBuilder (com.fanap.podcall.PodCallBuilder)3 PodChatException (com.fanap.podchat.util.PodChatException)3 CallServiceManager (com.fanap.podchat.call.audio_call.CallServiceManager)2