0

I have an application that scan barcode with the Android device cameras. I take the example program here: https://github.com/journeyapps/zxing-android-embedded

Now, I want to scan a barcode with my device front camera. On that sample solution there's a button that allow you to take a barcode by front camera, but the problem is that the Preview image of camera is "flipped", like on a mirror, and so the application can't read the barcode.

Is there a method to overcome this problem and to make sure that the recorded image is displayed correctly?

Kara
  • 6,115
  • 16
  • 50
  • 57
mf87
  • 75
  • 9

1 Answers1

0

This mirroring is hardcoded into the camera service, and can not be disabled.

Try applying a transformation matrix to a TextureView. As per Prevent flipping of the front facing camera

This works for API level >= 14

Community
  • 1
  • 1
Gaurav Sarma
  • 2,248
  • 2
  • 24
  • 45
  • Thank you for the reply! I tried to apply that method and it works, but the problem is that the camera isn't fluid like normal camera, it stutters so much. Probably it comes from the fact that we are making a transposition of pixels .... really is no other way to disable the front camera mirroring by code? – mf87 Aug 12 '16 at 07:25