0% found this document useful (0 votes)
30 views13 pages

H Android Camera

There are two main ways to access the camera in Android - via the MediaStore activity API or directly through the Camera object API. The MediaStore API provides basic camera actions through an intent-based activity, while the Camera API allows more direct control over the camera hardware by interacting with Camera objects. Both approaches are outlined, including how to get results back from the MediaStore activity and how to use important Camera classes like Camera and Parameters. Sample code is provided for simple apps using each camera access method.

Uploaded by

vahi torab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views13 pages

H Android Camera

There are two main ways to access the camera in Android - via the MediaStore activity API or directly through the Camera object API. The MediaStore API provides basic camera actions through an intent-based activity, while the Camera API allows more direct control over the camera hardware by interacting with Camera objects. Both approaches are outlined, including how to get results back from the MediaStore activity and how to use important Camera classes like Camera and Parameters. Sample code is provided for simple apps using each camera access method.

Uploaded by

vahi torab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Using Camera in Android

Via MediaStore Activity API or Direct Camera API

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Two Levels for Camera Access
 Access Camera via MediaStore Activity API
 android.provider.MediaStore

 Use Camera via more direct Camera object API


 android.hardware.Camera.*

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using MediaStore Activity
 This is an android activity which provides basic ACTIONS on
camera hardwares
 Use this activity in standard way of starting activities via
intents:

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using MediaStore Activity

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using MediaStore Activity
Getting the Result from Activity

 You must implement the onActivityResult() method:

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using MediaStore Activity: Simple Application

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using MediaStore Activity: Simple Application

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using MediaStore Activity: Simple Application

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using Camera Hardware API
 Use android.hardware.Camera(.*)

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using Camera Hardware API
Important Classes

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using Camera Hardware API
Other Camera Options

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using Camera Hardware API: Simple App

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm


Using Camera Hardware API: Simple App

Slides By Alireza Kazemi, Content From: http://www.tutorialspoint.com/android/android_camera.htm

You might also like