views:

79

answers:

2

I am starting an android camera app for taking pictures. When I ctrl-shift-O to get the import for the Camera class there are two choices: android.graphics.camera and android.hardware.camera. Which one should I use and what are the main differences?

+5  A: 

Not too sure about android.graphics.camera, but andrioid.hardware.camera is what you are looking for.

"The Camera class is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video. This class is a client for the Camera service, which manages the actual camera hardware."

Upon further research...

"The Camera class in the android.graphic package is very different, it is used to calculate 3d transformations that can then be applied to animations"

Orbit
+3  A: 

android.graphics.camera appears to only have functions for manipulating images for 3D transformations whereas android.hardware.camera is much fuller and has actual support for camera functions.

You definitely want to use android.hardware.camera. Full details on usage are here.

Ryan Berger