cameraManager.openDriver(surfaceHolder),也就是camera.open(),抛出IOException

来源:互联网 发布:linux 启动apache2 编辑:程序博客网 时间:2024/06/07 00:04
在代码前加// check Android 6 permission        if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)                == PackageManager.PERMISSION_GRANTED) {            Log.i("TEST","Granted");            //init(barcodeScannerView, getIntent(), null);        } else {            ActivityCompat.requestPermissions(this,                    new String[]{Manifest.permission.CAMERA}, 1);//1 can be another integer        }
                                             
0 0