Search in sources :

Example 1 with CallErrorVO

use of com.fanap.podchat.call.model.CallErrorVO in project pod-chat-android-sdk by FanapSoft.

the class CallPresenter method onCallClientErrors.

@Override
public void onCallClientErrors(ChatResponse<CallClientErrorsResult> response) {
    CallErrorVO error = response.getResult().getCallErrorVO();
    Participant cp = error.getParticipant();
    if (error.getCode() == ChatConstant.ERROR_CODE_CAMERA_NOT_AVAILABLE) {
        view.showMessage("دوربین " + cp.getName() + " قابل استفاده نیست!");
    }
    if (error.getCode() == ChatConstant.ERROR_CODE_MICROPHONE_NOT_AVAILABLE) {
        view.showMessage("میکروفن " + cp.getName() + " قابل استفاده نیست!");
    }
}
Also used : ResultAddParticipant(com.fanap.podchat.model.ResultAddParticipant) ResultParticipant(com.fanap.podchat.model.ResultParticipant) Participant(com.fanap.podchat.mainmodel.Participant) CallErrorVO(com.fanap.podchat.call.model.CallErrorVO)

Example 2 with CallErrorVO

use of com.fanap.podchat.call.model.CallErrorVO in project pod-chat-android-sdk by FanapSoft.

the class CallAsyncRequestsManager method handleOnCallClientErrorsReceived.

public static ChatResponse<CallClientErrorsResult> handleOnCallClientErrorsReceived(ChatMessage chatMessage) {
    ChatResponse<CallClientErrorsResult> response = null;
    try {
        CallErrorVO clientErrorVo = App.getGson().fromJson(chatMessage.getContent(), CallErrorVO.class);
        response = new ChatResponse<>();
        response.setUniqueId(chatMessage.getUniqueId());
        response.setSubjectId(chatMessage.getSubjectId());
        CallClientErrorsResult result = new CallClientErrorsResult(clientErrorVo);
        result.setCallId(chatMessage.getSubjectId());
        response.setResult(result);
    } catch (Exception e) {
        Log.wtf(TAG, e);
    }
    return response;
}
Also used : CallClientErrorsResult(com.fanap.podchat.call.result_model.CallClientErrorsResult) CallErrorVO(com.fanap.podchat.call.model.CallErrorVO) PodChatException(com.fanap.podchat.util.PodChatException) JsonSyntaxException(com.google.gson.JsonSyntaxException)

Aggregations

CallErrorVO (com.fanap.podchat.call.model.CallErrorVO)2 CallClientErrorsResult (com.fanap.podchat.call.result_model.CallClientErrorsResult)1 Participant (com.fanap.podchat.mainmodel.Participant)1 ResultAddParticipant (com.fanap.podchat.model.ResultAddParticipant)1 ResultParticipant (com.fanap.podchat.model.ResultParticipant)1 PodChatException (com.fanap.podchat.util.PodChatException)1 JsonSyntaxException (com.google.gson.JsonSyntaxException)1