Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Recognition of front camera Android API levels:</p> <p>9, 10</p> <p>Solution:</p> <p>Instead of camera.open() use following getFrontFacingCamera() function:</p> <pre><code>Camera getFrontFacingCamera() throws NoSuchElementException { Camera.CameraInfo cameraInfo = new Camera.CameraInfo(); for (int cameraIndex = 0; cameraIndex &lt; Camera.getNumberOfCameras(); cameraIndex++) { Camera.getCameraInfo(cameraIndex, cameraInfo); if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) { try { return Camera.open(cameraIndex); } catch (RuntimeException e) { e.printStackTrace(); } } } throw new NoSuchElementException("Can't find front camera.");} </code></pre> <p>Samsung Galaxy S with Android API level 7, 8 solution</p> <pre><code>void setFrontCamera(Camera camera) { Camera.Parameters parameters = camera.getParameters(); parameters.set("camera-id", 2); // (800, 480) is also supported front camera preview size at Samsung Galaxy S. parameters.setPreviewSize(640, 480); camera.setParameters(parameters); </code></pre> <p>}</p> <p>for more details visit this link <a href="http://developer.samsung.com/android/technical-docs/Common-Issues-in-Android" rel="noreferrer">http://developer.samsung.com/android/technical-docs/Common-Issues-in-Android</a></p> <p>To remove Class not Found exception using above code in android 2.2 or less please see a very useful article <a href="http://digitaldumptruck.jotabout.com/?p=797" rel="noreferrer">http://digitaldumptruck.jotabout.com/?p=797</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload