Course Content

Course Content

Description

Camera API

 

In this video our topic is Camera API.

A quick way to enable taking pictures or videos in your application without a lot of extra code is to use an Intent to invoke an existing Android camera application.

To use Camera Intent our first step is to create a Camera Intent. we need to create an intent that requests an image or video using one of the intents MediaStore.ACTION_IMAGE_CAPTURE and MediaStore.ACTION_VIDEO_CAPTURE to request image or video from an existing camera application.

To start the Camera Intent, we will use the startActivityForResult() method to execute the camera intent. After you start the intent, the Camera application user interface appears on the device screen and the user can take a picture or video.

Now to receive the Intent result, we need to set up an onActivityResult() method in your application to receive the call back and data from the camera intent. When the user finishes taking a picture or video, the system calls this method.

Other features if we talk about are,

android.hardware.camera to use Camera hardware

WRITE_EXTERNAL_STORAGE to store images or videos in external storage.

RECORD_AUDIO is needed when recording video with Audio.

FAQs

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
297K+ Downloads
App Download Section Circle 1
4.5 Rating
App Download Section Circle 2
10K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere