如何在Android中使用前置摄像头而不是后置摄像头进行ZXing扫描? [英] How to make the ZXing scan using the front camera not the back camera in Android?
本文介绍了如何在Android中使用前置摄像头而不是后置摄像头进行ZXing扫描?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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 ?
推荐答案
将额外的SCAN_CAMERA_ID设置为所需摄像机的ID
set extra SCAN_CAMERA_ID to the ID of the camera you want
通常是前一个.
例如
intent.putExtra("SCAN_CAMERA_ID", 1);
这篇关于如何在Android中使用前置摄像头而不是后置摄像头进行ZXing扫描?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文