0

If a user tries to scan a code with ZXing and they cannot i would like them to be able to click a button on the capture screen and quit the app? Is there such an option? if not where would I make this modification? I would like them to be able to navigate back without using the device buttons just stay in app. Thanks

Androider
  • 21,125
  • 36
  • 99
  • 158

1 Answers1

2

You would either modify http://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/InactivityTimer.java with the timeout you want (see the INACTIVITY_DELAY_SECONDS variable), or (much better) modify that class AND http://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/CaptureActivity.java to accept a timeout in the Intent. Strictly speaking, the timeout SHOULD be configurable, and if you read the source for the IntentIntegrator class that you can get to from the link @Jim Blackler posted it seems like the intent (hehe) was to have that accept a timeout (look at the comment in line 164 at http://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentIntegrator.java). However, that doesn't appear to accept a timeout right now.

Let me know how that works out for you.

Femi
  • 64,273
  • 8
  • 118
  • 148
  • Thanks I will try this and get back. Could you comment also on:http://stackoverflow.com/questions/5852059/zxing-barcode-reader-how-to-make-custom-border-around-capture-screen – Androider May 02 '11 at 07:51
  • This asks how to put border around capture screen (border screen). – Androider May 02 '11 at 07:52