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
  • 28
  • 34
Alexey Zakharov
  • 24,074
  • 41
  • 124
  • 194

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,074
  • 41
  • 124
  • 194
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
  • 10,440
  • 8
  • 47
  • 64
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,020
  • 8
  • 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