Best code examples for Android Camera class (android.hardware.Camera)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Camera class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android Camera examples from Open Source projects
This code example shows how to use the following methods: setPreviewDisplay, startPreview
43:	mCamera.setPreviewDisplay(holder); 
44:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters
135:	mParameters = mCamera.getParameters(); 
-
148:	mCamera.setParameters(mParameters); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, stopPreview
194:	mCamera.stopPreview(); 
-
197:	Camera.Parameters p = mCamera.getParameters(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: stopPreview
159:	camera.stopPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters
141:	String focus_mode = camera.getParameters().getFocusMode(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: startPreview
117:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setDisplayOrientation, setParameters, setPreviewDisplay, startPreview
43:	mCamera.stopPreview(); 
-
47:	Parameters p = mCamera.getParameters(); 
48:	mCamera.setDisplayOrientation(90); 
49:	mCamera.setParameters(p); 
-
57:	mCamera.setPreviewDisplay(mholder); 
58:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: setParameters
149:	mCamera.setParameters(params); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
253:	camera.stopPreview(); 
-
257:	Camera.Parameters p = camera.getParameters(); 
-
262:	camera.setParameters(p); 
-
264:	camera.setPreviewDisplay(holder); 
265:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: addCallbackBuffer
63:	mCamera.addCallbackBuffer(data); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: setPreviewDisplay
36:	camera.setPreviewDisplay(previewHolder); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview
185:	Camera.Parameters parameters = mCamera.getParameters(); 
-
189:	mCamera.setParameters(parameters); 
-
207:	mCamera.setPreviewDisplay(mHolder); 
208:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters
172:	String focus_mode = camera.getParameters().getFocusMode(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay
38:	Camera.Parameters p = camera.getParameters(); 
-
40:	camera.setParameters(p); 
-
44:	camera.setPreviewDisplay(holder); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: startPreview
205:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters
90:	Parameters parameters = mCamera.getParameters(); 
-
108:	mCamera.setParameters(parameters); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: setPreviewDisplay
51:	camera.setPreviewDisplay(previewHolder); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: stopPreview
171:	camera.stopPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
63:	mCamera.stopPreview(); 
-
69:	Camera.Parameters parameters = mCamera.getParameters(); 
-
73:	mCamera.setParameters(parameters); 
-
77:	mCamera.setPreviewDisplay(mHolder); 
78:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: startPreview
166:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setDisplayOrientation, setParameters, setPreviewDisplay, startPreview
89:	mCamera.stopPreview(); 
-
96:	Camera.Parameters parameters = mCamera.getParameters(); 
-
103:	mCamera.setDisplayOrientation(90); 
104:	mCamera.setParameters(parameters); 
105:	mCamera.setPreviewDisplay(holder); 
106:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: stopPreview
159:	camera.stopPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
111:	camera.stopPreview(); 
-
114:	Camera.Parameters p = camera.getParameters(); 
-
116:	camera.setParameters(p); 
117:	camera.setPreviewDisplay(holder); 
118:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters
191:	mSupportedPreviewSizes = mCamera.getParameters() 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: setPreviewDisplay
69:	mCamera.setPreviewDisplay(holder); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters
168:	Parameters params = mCamera.getParameters(); 
-
174:	mCamera.setParameters(params); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: startPreview
212:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: stopPreview
140:	camera.stopPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
33:	camera.stopPreview(); 
-
43:	Parameters params = camera.getParameters(); 
-
47:	camera.setParameters(params); 
48:	camera.setPreviewDisplay(previewHolder); 
49:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: setPreviewDisplay
75:	camera.setPreviewDisplay(previewHolder); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters
52:	mSupportedPreviewSizes = mCamera.getParameters().getSupportedPreviewSizes(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: stopPreview
287:	camera.stopPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
92:	mCamera.stopPreview(); 
-
99:	Parameters parameters = mCamera.getParameters(); 
-
112:	mCamera.setParameters(parameters); 
-
120:	mCamera.setPreviewDisplay(mHolder); 
121:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
69:	camera.stopPreview(); 
70:	Camera.Parameters p = this.camera.getParameters(); 
-
72:	this.camera.setParameters(p); 
-
75:	this.camera.setPreviewDisplay(holder); 
76:	this.camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
116:	camera.stopPreview(); 
-
118:	Camera.Parameters p = camera.getParameters(); 
-
120:	camera.setParameters(p); 
121:	camera.setPreviewDisplay(holder); 
122:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
98:	mCamera.stopPreview(); 
-
104:	Camera.Parameters params = mCamera.getParameters(); 
-
108:	mCamera.setParameters(params); 
-
113:	mCamera.setPreviewDisplay(mHolder); 
114:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
117:	mCamera.stopPreview(); 
-
124:	Camera.Parameters parameters = mCamera.getParameters(); 
-
126:	mCamera.setParameters(parameters); 
-
129:	mCamera.setPreviewDisplay(mHolder); 
130:	mCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: startPreview
153:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
58:	camera.stopPreview(); 
-
60:	Camera.Parameters p = camera.getParameters(); 
-
63:	camera.setParameters(p); 
-
66:	camera.setPreviewDisplay(holder); 
67:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
122:	camera.stopPreview(); 
-
126:	Camera.Parameters p = camera.getParameters(); 
-
129:	camera.setParameters(p); 
130:	camera.setPreviewDisplay(holder); 
131:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
118:	myCamera.stopPreview(); 
-
121:	Camera.Parameters p = myCamera.getParameters(); 
-
124:	myCamera.setParameters(p); 
125:	myCamera.setPreviewDisplay(holder); 
126:	myCamera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
77:	camera.stopPreview(); 
-
79:	Camera.Parameters p = camera.getParameters(); 
-
82:	camera.setParameters(p); 
-
85:	camera.setPreviewDisplay(holder); 
86:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getParameters, setParameters, setPreviewDisplay, startPreview, stopPreview
167:	camera.stopPreview(); 
-
170:	Camera.Parameters p = camera.getParameters(); 
-
175:	camera.setParameters(p); 
-
177:	camera.setPreviewDisplay(holder); 
178:	camera.startPreview(); 
Full Snippet Info
10
CodeRank
Related Android Camera Questions & Answers:
Other Android Camera Examples
12:	public class MakePhotoActivity extends Activity {
13:	  private final static String DEBUG_TAG = "MakePhotoActivity";
14:	  private Camera camera;
15:	  private int cameraId = 0;
16:

Read More

17:		ImageButton btnSwitch;
18:	
19:		private Camera camera;
20:		private boolean isFlashOn;
21:		private boolean hasFlash;

Read More

17:		ImageButton btnSwitch;
18:	
19:		private Camera camera;
20:		private boolean isFlashOn;
21:		private boolean hasFlash;

Read More

See Code Examples for Android Camera Methods: