why some android phones like Motorola fusion, Oppo A93, OnePlus phones reported issues while video capturing and uploading video?

49 Views Asked by At

I used video capturing code using the built-in camera in an application, but it reported issues on some Android phones like Motorola fusion, Oppo A93, OnePlus phones. On other phones it works perfectly, can anyone help me to solve this issue, I tried many times but it didn't work, I'm sharing my code below.

private void captureVideo() {

    Intent VideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
    if (VideoIntent.resolveActivity(getPackageManager()) != null) {
        VideoIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
        VideoIntent.putExtra("android.intent.extras.CAMERA_FACING", 1);
        VideoIntent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 3);
        VideoIntent.putExtra(MediaStore.EXTRA_FINISH_ON_COMPLETION,true);

        startActivityForResult(VideoIntent, VIDEO_REQUEST);

    }

}
1

There are 1 best solutions below

0
Mariya Varghese On

I get a solution for my own question. I added below code to my manifest file. so its working fine in every devices now.

   <queries>

    <intent>
        <action android:name="android.media.action.VIDEO_CAPTURE" />

    </intent>

</queries>