0

I recently checked out some code from Git on Android Studio. The project uses barcodeScanner, I use CameraConfigurationManager.java but when I check I get an error from CameraConfigurationUtils. Might anyone know why? Thanks!

code:

 private CameraConfigurationManager() {
  }

  static void configure(Camera camera) {
    Camera.Parameters parameters = camera.getParameters();
    parameters.setPreviewSize(1280, 720);
    //parameters.setPreviewSize(1920, 1080);
    configureAdvanced(parameters);
    camera.setParameters(parameters);
    //logAllParameters(parameters);
  }

  private static void configureAdvanced(Camera.Parameters parameters) {
    CameraConfigurationUtils.setBestPreviewFPS(parameters);
    CameraConfigurationUtils.setBarcodeSceneMode(parameters);
    CameraConfigurationUtils.setVideoStabilization(parameters);
    CameraConfigurationUtils.setMetering(parameters);
    CameraConfigurationUtils.setZoom(parameters, ZOOM);
  }

  private static void logAllParameters(Camera.Parameters parameters) {
    if (Log.isLoggable(TAG, Log.INFO)) {
      for (String line : CameraConfigurationUtils.collectStats(parameters).split("\n")) {
        Log.i(TAG, line);
      }
    }
  }

}
Sean Owen
  • 66,182
  • 23
  • 141
  • 173
DaChavoh
  • 100
  • 1
  • 16

1 Answers1

0

You downloaded the zxing source code. The glass module depends on android-common which has the class you're looking for.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • Can you please explain it to me , What did I do wrong or what must I do to correct it. – DaChavoh Feb 13 '15 at 21:51
  • 1
    You will need to include the CameraConfigurationUtils class in your project, which is [here](https://github.com/zxing/zxing/tree/master/android-core). @Sean Owen, please correct me if I'm wrong. – Koh Feb 14 '15 at 00:11
  • @Koh I rolled back your edit, since it was pointing to another project. You do not generally consume libraries by copying source code; you can and should use Maven for instance, or grab the compiled .jar for it. – Sean Owen Feb 16 '15 at 16:00