Audio call not working (Android SDK)

Hi team,

We have implemented audio call, but when i call someone, i can hear them but they cannot hear me… The call is initiating and both users are in the room, but one cannot hear the other person… What is the reason for this, code snippet is here:

Call Request Send:

@Override
public void sendCallRequest(Context context, String contactUid, String receiverTypeUser, String callType) {

    Call call = new Call(contactUid, receiverTypeUser, callType);
    CometChat.initiateCall(call, new CometChat.CallbackListener<Call>() {
        @Override
        public void onSuccess(Call call) {
            CommonUtils.startCallIntent(context, ((User) call.getCallReceiver()), call.getType(), true, call.getSessionId());
        }

        @Override
        public void onError(CometChatException e) {

        }

    });
}

@Override
public void addCallEventListener(String callEventListener) {

    CometChat.addCallListener(callEventListener, new CometChat.CallListener() {
        @Override
        public void onIncomingCallReceived(Call call) {


            CommonUtils.startCallIntent(context, (User) call.getCallInitiator(), call.getType(),
                    false, call.getSessionId());

        }

        @Override
        public void onOutgoingCallAccepted(Call call) {
		
			Intent callIntent = new Intent(context, CallActivity.class);
            callIntent.putExtra(StringContract.IntentStrings.SESSION_ID, call.getSessionId());
            context.startActivity(callIntent);
            ((IncomingCallActivity) context).finish();

        }

        @Override
        public void onOutgoingCallRejected(Call call) {

        }

        @Override
        public void onIncomingCallCancelled(Call call) {

        }
    });
}

answerCall:

@Override
public void answerCall(final Camera camera, final RelativeLayout mainView, final Context context, String sessionId) {

    CometChat.acceptCall(sessionId, new CometChat.CallbackListener<Call>() {
        @Override
        public void onSuccess(Call call) {

            Intent callIntent = new Intent(context, CallActivity.class);
            //callIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            callIntent.putExtra(StringContract.IntentStrings.SESSION_ID, call.getSessionId());
            context.startActivity(callIntent);
            ((IncomingCallActivity) context).finish();
        }

        @Override
        public void onError(CometChatException e) {

        }

    });

//
}

CallActivity class:

public class CallActivity extends AppCompatActivity implements CallActivityContract.CallActivityView {

private RelativeLayout callView;
private String sessionId;
private static final String TAG = "CallActivity";
private CallActivityContract.CallActivityPresenter callActivityPresenter;
private CallSettings callSettings;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_call);

    callActivityPresenter = new CallActivityPresenter();
    callActivityPresenter.attach(this);

    callView = findViewById(R.id.call_view);

    if (getIntent().hasExtra(StringContract.IntentStrings.SESSION_ID)) {
        sessionId = getIntent().getStringExtra(StringContract.IntentStrings.SESSION_ID);
        Logger.error(TAG, " sessionId " + sessionId);

        CometChat.startCall(CallActivity.this, sessionId, callView, new CometChat.OngoingCallListener() {
            @Override
            public void onUserJoined(User user) {
                Logger.error(TAG, " Name " + user.getName());
                Toast.makeText(CallActivity.this, "Calling click", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onUserLeft(User user) {
                Log.d(TAG, "onUserLeft: " + user.getName());

            }

            @Override
            public void onError(CometChatException e) {
                Log.d(TAG, "onError: " + e.getMessage());
            }

            @Override
            public void onCallEnded(Call call) {
                Log.d(TAG, "onCallEnded: " + call.toString());
                finish();
            }
        });
    }
}

@Override
protected void onStart() {
    super.onStart();
    callActivityPresenter.addCallListener(this,TAG);
}

@Override
protected void onDestroy() {
    super.onDestroy();
    callActivityPresenter.removeCallListener(TAG);
}

}

can you assist pls @mayur.bhandari

Hello @flipspot
Can you please share the version of the SDK that you are using?

implementation ‘com.cometchat:pro-android-chat-sdk:2.1.4’ @aditya.gokula

@flipspot
Can you please try upgrading to the latest version of the Android SDK (version 2.3.5) and let us know if you are facing the same issue. We checked with the latest version and both audio and video calls are working as expected.

Awaiting reply
Thanks

Also, please make sure you change the url of the maven repo in the project level gradle file from

https://dl.bintray.com/cometchat/pro

to

https://dl.cloudsmith.io/public/cometchat/cometchat-pro-android/maven/

to use the latest version. Due to the shutdown of bintray services, we had to move our maven repository and only SDK versions 2.3.0 and above are available for use.

Thanks

Whenever we update the SDK it takes a lot of time to do it, and alot of the features like typing indicator and read receipts stop working. Is there a way to resolve this issue without upgrading the SDK?

If we update the url of the maven repo without upgrading the SDK, will this resolve the issue. Or what do you suggest @aditya.gokula ?

Is there any update/info?

helloo… any update please?