Closed abbasalim closed 7 years ago
@abbasalim please provide your device details, os version and steps to reproduce this issue.
i tested this in my galaxy j7 device with android 5.1
The app runs perfectly fine for me. @abbasalim please provide steps to reproduce this issue.
i used this code:
qrEader = new QREader.Builder(this, surfaceView, new QRDataListener() {
@Override public void onDetected(final String data) {
Log.d("QREader", "Value : " + data);
textView_qrcode_info.post(new Runnable() {
@Override public void run() {
textView_qrcode_info.setText(data);
}
});
}
}).facing(QREader.BACK_CAM)
.enableAutofocus(true)
.height(800)
.width(1100)
.build();
qrEader.init();
//////
@Override protected void onStart() {
super.onStart();
// Call in onStart
qrEader.start();
}
@Override protected void onDestroy() {
super.onDestroy();
// Call in onDestroy
qrEader.stop();
qrEader.releaseAndCleanup();
}
in my Activity
Do you have surface view in the layout and referenced in code as below ?
surfaceView = (SurfaceView) findViewById(R.id.camera_view);
Everything looks fine to me. Are you using Instant Run ? Can you confirm uninstalling the app and reinstalling it without Instant run helps you or not ?
i also tested in lg g2 with android 5.0 but :|
Exception thrown from receiver. java.lang.IllegalStateException: Detector processor must first be set with setProcessor in order to receive detection results. at com.google.android.gms.vision.Detector.receiveFrame(Unknown Source) at com.google.android.gms.vision.CameraSource$zzb.run(Unknown Source) at java.lang.Thread.run(Thread.java:818)
Let me do some more testing and I will update you soon.
@abbasalim Already merged the fix into develop as provided by @punksta , hence closing this issue. Reopen if it persists.
E/CameraSource: Exception thrown from receiver. java.lang.IllegalStateException: Detector processor must first be set with setProcessor in order to receive detection results. at com.google.android.gms.vision.Detector.receiveFrame(Unknown Source) at com.google.android.gms.vision.CameraSource$zzb.run(Unknown Source) at java.lang.Thread.run(Thread.java:818)
i use your sample code exactly, but recive this error