I have an app in the Play Store developed for a non-profit NGO, where tax coupons are donated and stored in an Excel worksheet each record, where it contains:
- CNPJ
- Date of Purchase
- COO
- Note value
With QR code being a trend for these coupons as well, I need help getting my app to extract this information when reading QR Code.
In the application there is a button that enables the QR Code, where it runs the Barcode Scanner. Currently my code looks like this:
// Botão para abrir câmera e usar o QR Code (Irá abrir a Store para baixar um app nativo)
btnQR = (Button) findViewById(R.id.btnQR);
btnQR.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
IntentIntegrator integrator = new IntentIntegrator(MainActivity.this);
integrator.addExtra("SCAN_WIDTH", 640);
integrator.addExtra("SCAN_WEIGHT", 480);
integrator.addExtra("SCAN_MODE", "QR_CODE_MODE,PRODUCT_MODE");
integrator.addExtra("PROMPT_MESSAGE", "Escaneie o QR Code");
integrator.initiateScan(IntentIntegrator.PRODUCT_CODE_TYPES);
}
});
The above code enables the reader.
I need help on this part. I have the manual open and I saw that inside the QR Code there is also Hash QR Code, and that information is encrypted in SHA-1, and should be in HEXADECIMAL.
My case would be to read this encoding, and decode, causing the information I need (described at the beginning) to automatically fill in.
Thank you in advance.