ZXing Integration in Android Is there a way to quit scanning without clicking on return button
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
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.
精彩评论