I currently develop a bookmarking application. So I used the zxing project to scan the ISBN, however I don’t know why after integrating the scanner it seems not working well. Sometimes, it catch well the barcode, but when I repeat it takes long time and gets wrong number. It seems odd to compare with this app Reading Progress. The application also request user to download an external Barcode Scanner from xzing, and it works very well. So did I integrate the Barcode Scanner in wrong way (Im not using zxing as a lib).
This is my code:
public void scan(View view) {
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "ISBN");
startActivityForResult(intent, 0);
}
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String isbn = intent.getStringExtra("SCAN_RESULT");
Intent i = new Intent(MainActivity.this, ResultActivity.class);
i.putExtra("isbn", isbn);
startActivity(i);
} else if (resultCode == RESULT_CANCELED) {
Toast.makeText(this, "You messed up", Toast.LENGTH_SHORT).show();
}
}
}
I used the mode “QR_CODE_MODE” but it even doesn’t work at all so I change to ISBN mode
The sacn mode use both QRMODE,1D MODE