【问题标题】:How to make the ZXing scan using the front camera not the back camera in Android?如何在Android中使用前置摄像头而不是后置摄像头进行ZXing扫描?
【发布时间】:2016-10-20 05:35:37
【问题描述】:

我通过下面的代码ContinuousCaptureActivity使用ZXing,而zxing(默认)使用back摄像头进行扫描,如何使其扫描使用前置摄像头?

【问题讨论】:

    标签: android android-studio zxing barcode-scanner


    【解决方案1】:

    将额外的 SCAN_CAMERA_ID 设置为您想要的相机 ID

    前面的通常是 1。

    例如

     intent.putExtra("SCAN_CAMERA_ID", 1);
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-01-23
    • 1970-01-01
    • 2016-03-06
    • 1970-01-01
    • 1970-01-01
    • 2019-06-16
    • 1970-01-01
    相关资源
    最近更新 更多