Android Phones – Camera Preview Sizes

This is a list of known (to me) previewSizes that are available across different Android handsets.

These sizes can be useful when developing applications which want to make use of the hardware camera. Some handsets require that when specifying a these parameters that only those dimension pairs that are explicitly supported can be used. In these cases if you try to call startPreview() you will find that your application crashes. with the following;

android.hardware.Camera.native_setParameters(Native Method) at
android.hardware.Camera.setParameters(Camera.java:647) at
com.CameraApp.Preview.surfaceChanged(Preview.java:67) at
android.view.SurfaceView.updateWindow(SurfaceView.java:538) at
android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) at
android.view.ViewGroup.drawChild(ViewGroup.java:1638) at

HTC Desire previewSizes

  • 1280 x 720
  • 800 x 480
  • 768 x 432
  • 720 x 480
  • 640 x 480
  • 576 x 432
  • 480 x 320
  • 400 x 240
  • 384 x 288
  • 352 x 288
  • 320 x 240
  • 272 x 272
  • 240 x 240
  • 240 x 160
  • 176 x 144

HTC Desire HD previewSizes

  • 1280 x 720
  • 800 x 480
  • 768 x 432
  • 720 x 480
  • 640 x 480
  • 576 x 432
  • 480 x 320
  • 400 x 240
  • 384 x 288
  • 352 x 288
  • 320 x 240
  • 272 x 272
  • 240 x 240
  • 240 x 160
  • 176 x 144
  • 160 x 120

Google Nexus S previewSizes

  • 720 x 480
  • 640 x 480
  • 352 x 288
  • 176 x 144

If you want to gather similar information about other handsets then place code similar to the below in your project and then run the app with your handset attached via USB (in debug mode).

List<Camera.Size> previewSizes = parameters.getSupportedPreviewSizes();
for (Integer i = 0; i < previewSizes.size(); i++) {
    Log.d("Shoot", previewSizes.get(i).width + " x " + previewSizes.get(i).height);
}

Leave a Reply

Your email address will not be published. Required fields are marked *