Android Camera

August 11,2016

These are the following two ways, in which you can use camera in your application

  • Using existing android camera application in our application
  • Directly using Camera API provided by android in our application

Using existing android camera application in our application

You will use MediaStore.ACTION_IMAGE_CAPTURE to launch an existing camera application installed on your phone. Its syntax is given below

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

Apart from the above, there are other available Intents provided by MediaStore. They are listed as follows

Sr.No Intent type and description
1 ACTION_IMAGE_CAPTURE_SECURE

It returns the image captured from the camera , when the device is secured

2 ACTION_VIDEO_CAPTURE

It calls the existing video application in android to capture video

3 EXTRA_SCREEN_ORIENTATION

It is used to set the orientation of the screen to vertical or landscape

4 EXTRA_FULL_SCREEN

It is used to control the user interface of the ViewImage

5 INTENT_ACTION_VIDEO_CAMERA

This intent is used to launch the camera in the video mode

6 EXTRA_SIZE_LIMIT

It is used to specify the size limit of video or image capture size

Leave a comment