Code example for Camera

Methods: autoFocus

  public void requestAutoFocus(Handler handler, int message) {
    if (camera != null && previewing) {
      autoFocusCallback.setHandler(handler, message);
      //Log.d(TAG, "Requesting auto-focus callback"); 
   * Calculates the framing rect which the UI should draw to show the user where to place the 
   * barcode. This target helps with alignment as well as forces the user to hold the device 
   * far enough away to ensure the image will be in focus. 
   * @return The rectangle to draw on screen in window coordinates. 
  public Rect getFramingRect() {
    Point screenResolution = configManager.getScreenResolution();
    if (framingRect == null) {
      if (camera == null) {