How to call a single camera with a recording, as well as image capture?

Scenario:

Begin assigning a camera where the intent should be able to record or record an image.

What I already know:

  • To start setting up a camera for video recording

    Intent cameraIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);

  • To start the camera setup for image capture

    Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

Question: I saw that every time we launch the camera as an independent, we get all the camera parameters, such as image capture, video recording, etc.

So, how can I create one intention that has both functionality programmatically?

Note. I found the same question on our forum ( Duplicate question ), but did not answer it, so he again asked it.

Thanks in advance.

+6
source share

Source: https://habr.com/ru/post/972159/


All Articles