在代码前加 // 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 }
cameraManager.openDriver(surfaceHolder),也就是camera.open(),抛出IOException
最新推荐文章于 2023-04-18 09:38:44 发布