nisrulz / qreader

:white_square_button: [Android Library] Read QR codes using google's mobile vision api, but without the hassle
http://nisrulz.github.io/qreader
Apache License 2.0
369 stars 108 forks source link

Black screen on one of my two phones #39

Closed rocky58 closed 7 years ago

rocky58 commented 7 years ago

Hello nisrulz, I have two smartphone: 1 - Note 4 with Android 6.01 and all is OK; 2 - Chinese phone with Android 6.0 and screen is black; when I press START/STOP the button text is always STOP. Inside onCreate(): stateBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (qrEader.isCameraRunning()) { // THIS PIECE OF CODE IS NEVER EXECUTED!! stateBtn.setText(getString(R.string.btn_start_qrcode)); qrEader.stop(); } else {// THIS PIECE OF CODE IS ALWAYS EXECUTED!! stateBtn.setText(getString(R.string.btn_stop_qrcode)); qrEader.start(); } } });

Any idea? Thanks in advance. Rocco

rocky58 commented 7 years ago

I found the problem. It was Android 6 camera rights problem.

Thanks.