How to take screenshot of video call in quickblox android sdk ?
I want frame or bitmap of the remote user on video call.
I have used below method but it is not working.
remoteFullScreenVideoView.addFrameListener(new EglRenderer.FrameListener() { @Override public void onFrame(Bitmap bitmap) { Log.d(TAG, "onFrame bitmap= " + bitmap); showPictureURL(bitmap); } }, 1f);
You should add button e.g. "Take Screen Frame" and press it when you need to take frame during the video call. Pressing this button calls example method below:
private void forExampleTakeScreenShot(QBConferenceSurfaceView remoteVideoView) {
if (remoteVideoView != null) {
remoteVideoView.addFrameListener(new EglRenderer.FrameListener() {
@Override
public void onFrame(Bitmap bitmap) {
runOnUiThread(() -> {
//
// there you can do whatever you want to save bitmap or place it into imageView
//
remoteVideoView.removeFrameListener(this); // <- this is important
});
}
},1);
}
}
Please note, that after taking a bitmap of the video frame you should call remoteVideoView.removeFrameListener(this);
Hello @nitin-appinventiv
This is Nikolay from QuickBlox support.
Please let me know if you had a chance to check the previous reply and try the provided solution.