error while running app with basic implementation of Zxing
opened this issue · comments
Deleted user commented
W/CameraBase: An error occurred while connecting to camera: 0
Will Caine commented
You need to specify that you need camera access in your AndroidManifest.xml file and might also need to request camera permission in your activity class.
###AndroidManifest.xml
<application>
...
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.CAMERA" />
</applciation>
###MainActivity.java
protected void onCreate(Bundle savedIntanceState) {
...
ActivityCompat.requestPermissions(this, new String[]{CAMERA}, REQUEST_CAMERA);
}
See this guide for a full example.
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.