QR Code reader embedded in my own Activity

Asked

Viewed 957 times

2

I need to implement a QR code reader in my Activity, ie NO REDIRECT. Using Zxing will not solve my problem.

To get an idea, see in your application Whatsapp, in Whatsapp Web function: There is an Activity, with a text on top, and such, and then just below a square, with the camera already active, just waiting for Voce point the phone to the Qrcode.

That’s what I need. Develop a QR code reader within my own Activity. Without having to call another API, redirect, push a button to get started, none of that.

Important detail before anyone responds: Using Zxing WILL NOT SOLVE MY PROBLEM unless you have modified the code so that I can use it in MY OWN ACTIVITY, ok :)

Can someone please indicate me a tutorial or give me a hint? I use Android Studio.

  • You’ve already taken a look at the new google api? Mobile Vision, here have an example of how to implement, you can put a Fragment of the camera and use the google API to verify that the image is a QR code

  • Thank you! I found the answer on this link: https://code.tutsplus.com/tutorials/reading-qr-codes-using-the-mobile-vision-api-cms-24680

2 answers

3

You can use the Barcode API of Google itself.

It supports the formats:

  • 1D barcodes: EAN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF, Codabar.
  • 2D barcodes: QR Code, Data Matrix, PDF-417, AZTEC.

You can find an example here.


References:

https://developers.google.com/vision/barcodes-overview

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.