How to make the ZXing scan using the front camera not the back camera in Android?

落花浮王杯 提交于 2019-12-25 07:17:59

问题


I am using the ZXing by the following code ContinuousCaptureActivity, and the zxing using (by default) the back camera to scan, how to make it scan using the front camera ?


回答1:


set extra SCAN_CAMERA_ID to the ID of the camera you want

usually 1 for the front one.

for example

 intent.putExtra("SCAN_CAMERA_ID", 1);


来源:https://stackoverflow.com/questions/40141833/how-to-make-the-zxing-scan-using-the-front-camera-not-the-back-camera-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!