2

I want to read qr code from GDK app to get authorization token.

Is there any build in methods to read QR codes in GDK?

Tony Allevato
  • 6,429
  • 1
  • 29
  • 34
Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197

3 Answers3

1

QR code could be obtained from bitmap using this ZXing library

To get the bitmap Glass camera intent could be used.

Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197
1

This worked for me.

Intent objIntent = new Intent("com.google.zxing.client.android.SCAN");
objIntent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(objIntent, 0);
LaurentG
  • 11,128
  • 9
  • 51
  • 66
Acarin
  • 57
  • 6
0

You can read QR using the library located at https://code.google.com/p/barcodefraglibv2/wiki/HowTo Have tested it to work on Glass without any problem.

Abhinava
  • 1,030
  • 9
  • 19
  • This is not working on the Google Glass!! You get the "Crop rectangle does not fit within image data" error. IllegalArgumentException – Aksiom Oct 24 '14 at 12:06