get Default Camera Instance - Android android.hardware

Android examples for android.hardware:Camera

Description

get Default Camera Instance

Demo Code

import android.hardware.Camera;

public class Main {

  /**//from www  .  j a  va  2  s. c o  m
   * @return the default camera on the device. Return null if there is no camera
   *         on the device.
   */
  public static Camera getDefaultCameraInstance() {
    return Camera.open();
  }

}

Related Tutorials