I’m trying to achieve the goal using following goal.
ActivityResultLauncher<Uri> launcher = registerForActivityResult(new ActivityResultContracts.CaptureVideo(), new ActivityResultCallback<Boolean>() {
@Override
public void onActivityResult(Boolean o) {
vvCaptureVideo.setVideoPath(o.toString());
}
});
As CaptureVideo is taking Uri as input and Boolean on output. My first question here is the setPath() is ok to conver Boolean to string. Second question is which uri should i give in input while launcher.launch(Uri).
ActivityResultLauncher launcher = registerForActivityResult(new ActivityResultContracts.CaptureVideo(), new ActivityResultCallback() {
@Override
public void onActivityResult(Boolean o) {
vvCaptureVideo.setVideoPath(o.toString());
}
});
Muhammad Salman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.