How to use RTR Android data capture using front camera?

  • 150 Views
  • Last Post 01 June 2018
ziselos posted this 25 February 2018

Is it possible to ebable front camera, instead of back in data capture samples? I tried to change the onResume() method adding this :

camera = Camera.open(idOfFrontCamera);

but i am getting error

java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters(Camera.java:2586)
at com.abbyy.mobile.sample.MainActivity.configureCameraAndStartPreview(MainActivity.java:674)
at com.abbyy.mobile.sample.MainActivity.setCameraPreviewDisplayAndStartPreview(MainActivity.java:394)
at com.abbyy.mobile.sample.MainActivity.access$800(MainActivity.java:44)
at com.abbyy.mobile.sample.MainActivity$3.surfaceChanged(MainActivity.java:219)
at android.view.SurfaceView.updateWindow(SurfaceView.java:664)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:177)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2366)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1366)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6768)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:926)
at android.view.Choreographer.doCallbacks(Choreographer.java:735)
at android.view.Choreographer.doFrame(Choreographer.java:667)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:912)
at android.os.Handler.handleCallback(Handler.java:761)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

Oksana Serdyuk posted this 01 June 2018

This issue was discussed directly with ABBYY developers at GitHub here.

Close