Video Media transfer failed

Whenever I call from caller to callee notification gets recieved at callee side but after recieving the call, only connecting window shown up. Actual video communication is not happening. Also sometimes notification comes up and sometimes not. So this are the two main issues i am facing now.
Please help me out :cry: :cry:

Is this happening testing our sample apps?

In your SendBird Dashboard you have Calls Studio with a Widget you can try and our Calls app from android market too: https://play.google.com/store/apps/details?id=com.sendbird.calls.quickstart

About notifications: You mean PUSH notifications, correct? Make sure your logic registers your device to receive PUSH.

Make sure your user is not logged off. It must be authenticated with Sendbird Calls at least once. Check if the user is a valid call user by calling the List Users for Calls API and filtering on the user id; if the user does not exist, the user must authenticate with the SendBirdCall.authenticate(params) method before the user can receive calls.

About Push Notifications : I have integrated this video calling module in our existing application and it is already having push notification flow. So it is confirm that device receive push notification.

I have added authentication and login to the Sendbird server after login to our application. I have called logInForVideoCall() function after successful login to our application -

private void logInForVideoCall() {
    String appId = BaseApplication.APP_ID;
    String userId = "dummy";
    String accessToken = "";

    if (!TextUtils.isEmpty(appId) && !TextUtils.isEmpty(userId)
            && ((BaseApplication)getApplication()).initVideoCall(appId)) {
        AuthenticationUtils.authenticate(getApplicationContext(), preferences.getString(Constants.Preferences.RegisterId,""), userId, accessToken, isSuccess -> {
            if (isSuccess) {
                setResult(RESULT_OK, null);
                Intent intent = new Intent(RegisterLock.this, Dashboard.class);
                startActivity(intent);
                finish();
            }
        });
    }
} 

And notification sometimes got recieved but by clicking on it video not getting displayed on both the sides. Is it the issue with firebase-messaging dependency? Because In my application its version is ‘com.google.firebase:firebase-messaging 11.8.0’ and in your application sendbird/quickstart-calls-android its version is ‘com.google.firebase:firebase-messaging:20.2.3’ .In 20.2.3 version of firebase-messaging there is a method onNewToken() in which registartion of push token is done, but we have registered the push notification token in back-end server also so I have used that one. Please help me out :pensive:

This part:

And notification sometimes got recieved but by clicking on it

It means that if you are in the background and receive a call, a notification is shown and you have to click on it to open the app? This is how the SendBird official Android demo app works. Google allows apps to appear from the background using a notification.

For the case of:

video not getting displayed on both the sides

I think this refers to the video element where you show your image and the caller, right?
If so, please check the code where you have:

<com.sendbird.calls.SendBirdVideoView
                android:id="@+id/video_view_fullscreen"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />


<com.sendbird.calls.SendBirdVideoView
                android:id="@+id/video_view_small"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

video_view_fullscreen is the big image and video_view_small is the small one.

From your Activity you have:

private SendBirdVideoView mVideoViewFullScreen;
private SendBirdVideoView mVideoViewSmall;

and then

    // Video Big
    mVideoViewFullScreen = findViewById(R.id.video_view_fullscreen);
    mVideoViewFullScreen.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT);
    mVideoViewFullScreen.setZOrderMediaOverlay(false);
    mVideoViewFullScreen.setEnableHardwareScaler(true);

    // Video Small
    mVideoViewSmall = findViewById(R.id.video_view_small);
    mVideoViewSmall.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT);
    mVideoViewSmall.setZOrderMediaOverlay(true);
    mVideoViewSmall.setEnableHardwareScaler(true);

Once you receive a call (or make a call) you need to set as your needs:

   call.setLocalVideoView(mVideoViewFullScreen);
   call.setRemoteVideoView(mVideoViewSmall);

Hope this helps and it’s what you needed :wink: