1

On Google Glass, calling Camera via Intent as below immediately takes a picture instead of showing camera view finder.

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, TAKE_PICTURE_REQUEST);

Does anyone know a way to show a view finder (and "Tap to Scan" text overlaying) exactly as Google Glass Settings app does when letting you scan the QRCode on (https://glass.google.com/myglass) to connect to Wifi?

Zach Johnson
  • 23,678
  • 6
  • 69
  • 86
  • I think your best bet is to try and use Zxing: https://github.com/zxing/zxing which is trivial to run on Android, but may take some tweaks on Glass. A google search will get you others experience getting it to work on Glass. I assume your main goal is to scan a QR code. – Mark Scheel Apr 09 '14 at 04:13

1 Answers1

0

You would have to have a SurfaceView that shows the camera preview, instead of letting the camera app do the work.

See Android Camera Surface View for how to do this in Android (code will also work on Glass).

Community
  • 1
  • 1
Victor KP
  • 437
  • 3
  • 10