tipugin
tipugin

Reputation: 259

Android camera controls

Is it possible to use camera controls like in default Camera app? I've implemented my camera app as described here, but still can't figure how to add these controls.

Upvotes: 1

Views: 1536

Answers (1)

Ryan Reeves
Ryan Reeves

Reputation: 10229

Camera parameters are viewed and modified through Camera.Parameters. Example (assumes mCamera is a camera instance):

Camera.Parameters params = mCamera.getParameters();

//View and modify parameters by calling the get/set parameters for the parameter you're interested in. Then call setParameters to commit the changes.

mCamera.setParameters(params);

Camera.Parameters contains get/set parameters that allow you to view and modify camera features. Camera.Parameters also contains methods that allow you to query the camera to see what values a given parameter will accept. For example, to determine what preview sizes the camera will accept you call getSupportedPreviewSizes() like this:

List<Camera.Size> previewSizes = params.getSupportedPreviewSizes();

Other camera parameters have similar design patterns. Review the Camera.Parameters documentation here for more information: http://developer.android.com/reference/android/hardware/Camera.Parameters.html

Upvotes: 1

Related Questions