Search code examples
androidqr-codegoogle-glassgoogle-gdkmetaio

How to read QR code in google glass android?


I am using metaio sdk for read qr and bar-code.

In Google glass i am not getting perfect result because google glass dont have auto focus.

But google glass wifi qr code scaning is good without auto focus. I require the same functionality like wifi qr code scanning in my app. and which library use for wifi qr code scanning i am not getting.

How can i get best solution for large distance scanning qr code like wifi qr code scanning in google glass.


Solution

  • You can utilize utilize a version of the ZXing open source library found here https://github.com/zxing/zxing. This possibly is the same library used on the glass for 2D decoding

    You can call and pass via intent to get your information in your app

     Intent intent = new Intent("com.google.zxing.client.android.SCAN");
     intent.setPackage("com.google.zxing.client.android");
     startActivityForResult(intent, QR_CODE_MODE);  
    

    There are two elaborated examples related to this question How to scan a QR code using Google Glass?

    edit: you need to download zxing's android client. You can get the latest copy that has the XE10 video scramble from their master branch.

    https://github.com/zxing/zxing

    Build the zxing/android package folder (eclipse/ant/android studio) and install your application) should work as normal.

    XE10 bug was fixed here: https://github.com/zxing/zxing/blob/39780fb86f3f887eb438edd58b323afe6142d669/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java