summaryrefslogtreecommitdiff
path: root/src/com/google/zxing/client/android/CameraManager.java
AgeCommit message (Collapse)AuthorFilesLines
2010-04-07Issue 376: re-set camera params after first auto-focus callback to make it ↵srowen1-530/+0
work on Droid. Along the way, did a very big reorganization of CameraManager since it was becoming spaghetti code git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1292 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-04-07Look for mot-zoom-stepsrowen1-4/+17
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1290 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-04-07Look for mot-zoom-valuessrowen1-1/+23
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1289 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-04-04Small thing, make log TAGs consistentsrowen1-1/+1
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1275 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-03-26Make light off by defaultsrowen1-1/+1
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1260 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-03-26Add option to disable front lightsrowen1-1/+6
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1259 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-03-19Don't set zoom without knowing maximum for suresrowen1-6/+10
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1247 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-03-15Set zoom a bit more reliably and aggressivelysrowen1-15/+79
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1245 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-03-01Per Daniel -- don't check phone's preview size as we want to use screen size ↵srowen1-16/+9
if possible git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1231 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-27Try out hacky support for enabling the front light on some devicessrowen1-0/+2
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1223 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-27Fix r1221 logicsrowen1-22/+19
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1222 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-26Committing potential fix for Issue 344 as it was reported to work, and works ↵srowen1-13/+88
in local testing git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1221 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-09Issue 344-related -- avoid NPE when previewFormatString is nullsrowen1-3/+1
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1205 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-26git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1128 ↵srowen1-0/+4
59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-26Committing for consideration since I really think this is a win. Issue 283.srowen1-0/+3
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1127 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-23Consolidated all the Android LuminanceSource classes into one file. Either a ↵dswitkin1-14/+14
device can be handled by this file, or the app won't work. The Android platform requires every device to support yuv420sp camera preview buffers, but we also let two other similar formats sneak in for compatibility. I also removed the ability to convert LuminanceSource data into ARGB images, which wasn't used. I also reverted a String-related change to QRCodeEncoder.java. The new method appears present in Java 1.6's String class but not in Android's. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1121 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-22Technically split out YUV 4:2:0 and 4:2:2 support and tried implementing RGB ↵srowen1-5/+7
conversion for 4:2:0 git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1119 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-03Issue 263srowen1-3/+8
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1094 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-10-23The final compatibility changes for Barcode Scanner 3.0, which is now finished.dswitkin1-2/+2
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1084 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-10-22- Added back support for Cupcake by making the choice of preview callback ↵dswitkin1-1/+23
conditional on the build flavor. - Fixed a number of non-dpi-aware resource dimensions. - Bumped the version to 3.0 beta 3. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1081 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-10-20- Fixed a crash on first launch after install on some hardware.dswitkin1-0/+3
- Moved the beep sound to the music stream and made the volume keys work. - Bumped the version to 3.0 beta 2. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1080 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-10-13Switched back to the one shot preview mechanism and lowered the beep volume ↵dswitkin1-3/+1
a bit. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1071 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-09-11Added some comments to public methods.dswitkin1-3/+38
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1051 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-09-11Lots of updates:dswitkin1-87/+140
- Added support for new YUYV preview buffer format. - Made the preview rectangle larger. - Added support for high resolution screens. - Updated for Donut but still runs on Cupcake. - Converted to standard Java coding style for member variables. - Added many comments and author tags. - Removed some Petit Four hacks and vestigial code. *** The app must be built with the Donut SDK from now on. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1049 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-09-04Final changes for Barcode Scanner 2.93.dswitkin1-2/+5
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1046 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-08-27Revert to pre-Cupcake preview callback system since seems to be some ↵srowen1-1/+2
collision between the new one and auto-focus callback that stops scanning in some cases. Also, remove a bad version number from search activity? git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1042 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-08-21Made another fix for the Samsung Galaxy, and bumped the version to 2.92.dswitkin1-3/+6
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1036 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-08-19Made a new fix to turn off the Samsung Galaxy flash, and cut release 2.91.dswitkin1-2/+3
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1035 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-22Set a camera parameter to force the flash off. Also fixed the uninstall ↵dswitkin1-0/+3
build targets. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1024 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-21Converted the Android client and the test app to use the Android 1.5 SDK, ↵dswitkin1-3/+3
and to use a more efficient preview frame mechanism too. We now require devices to be running Cupcake or a newer version of the platform. This change temporarily removes the Proguard step, which Sean is going to add back. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@1023 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-06Updates to compile against 1.5; figuring we will shortly need to be 1.5-friendlysrowen1-3/+5
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@964 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-11Hid the Share menu if the results screen was showing, since it didn't make ↵dswitkin1-2/+2
sense. Also change the autofocus delay to 1.5 seconds, to make it hunt a little less, and give the autoexposure system more time to run. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@683 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-18The new Android client, featuring:dswitkin1-0/+219
- a completely new result UI with multiple actions per barcode - Search Book Contents, powered by Google Book Search - support for calendar events - support for URLs and addresses in contact info - many other small improvements, like making URLs hyperlinked git-svn-id: http://zxing.googlecode.com/svn/trunk/android@625 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-19The new 0.9 SDK Android client.dswitkin1-311/+0
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@568 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20Standardize and update all copyright statements to name "ZXing authors" as ↵srowen1-1/+1
suggested by open-source team to correctly attribute copyright in a project with contributions from several sources. git-svn-id: http://zxing.googlecode.com/svn/trunk/android@455 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-03Merged revisions 378,380,382 via svnmerge from dswitkin1-1/+1
https://zxing.googlecode.com/svn/trunk/android-m3 ........ r378 | dswitkin | 2008-04-28 21:27:27 -0400 (Mon, 28 Apr 2008) | 4 lines - Added Joseph's excellent supermarket checkout beep. There seems to be a bug in the M3 framework where it sometimes plays twice or hiccups. - Changed the status bar to flash green for a second when the result points are drawn. - Added install as a target to the build file. - Fixed a crashing bug when decoding from preview mode (driver problem). ........ r380 | srowen | 2008-05-02 14:39:03 -0400 (Fri, 02 May 2008) | 2 lines Added preliminary support for MobileTag formats; not enabled yet. Added "sms:" URI support. ........ r382 | srowen | 2008-05-02 15:18:14 -0400 (Fri, 02 May 2008) | 1 line Many more little tweaks from IntelliJ inspections ........ git-svn-id: http://zxing.googlecode.com/svn/trunk/android@384 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-22Merged revisions 321,327,330,332,334,342-343,352-353,355-358,361-363,365,372 ↵dswitkin1-27/+68
via svnmerge from https://zxing.googlecode.com/svn/trunk/android-m3 ........ r321 | srowen | 2008-03-28 09:57:55 -0700 (Fri, 28 Mar 2008) | 1 line Updates for 0.6; set aside a different android-m3-home variable for android-m3 build ........ r327 | srowen | 2008-03-31 12:04:38 -0700 (Mon, 31 Mar 2008) | 1 line Made the RGB to luminance approximation/optimization a little faster -- one less shift ........ r330 | dswitkin | 2008-03-31 13:55:38 -0700 (Mon, 31 Mar 2008) | 1 line Changed the project names for the two Android clients to disambiguate them. ........ r332 | dswitkin | 2008-04-01 09:11:36 -0700 (Tue, 01 Apr 2008) | 1 line Added some debugging features to the M3 Android client. You can now press 'C' to capture a photo, 'U' to decode only UPC/1D barcodes, and 'Q' to decode only QR Codes. ........ r334 | dswitkin | 2008-04-01 12:23:05 -0700 (Tue, 01 Apr 2008) | 1 line Added latency measurement in milliseconds to the Android client. ........ r342 | dswitkin | 2008-04-03 14:13:50 -0700 (Thu, 03 Apr 2008) | 1 line Improved the Android M3 viewfinder display, by making the framing box larger and zooming in. Also fixed a bug when restarting the activity where the camera params were stale. Fixed handling of geo and tel URIs. ........ r343 | srowen | 2008-04-03 15:18:16 -0700 (Thu, 03 Apr 2008) | 1 line Moved the "geo:" fix to the 'right' place ........ r352 | dswitkin | 2008-04-08 08:25:13 -0700 (Tue, 08 Apr 2008) | 1 line Rewrote the Android M3 client to do continuous decoding, which means you no longer have to push the shutter button. Now you can just place the barcode in the viewfinder and it will display the contents as soon as it decodes them. That also means you no longer get "barcode not found" error dialogs which is a big improvement. Also made sure that capturing debug JPEGs uses unique filenames. ........ r353 | dswitkin | 2008-04-08 09:06:13 -0700 (Tue, 08 Apr 2008) | 1 line Improved the CameraThread state machine, and fixed a bug where preview would not continue after capture. ........ r355 | dswitkin | 2008-04-10 13:57:37 -0700 (Thu, 10 Apr 2008) | 1 line Made sure the BitmapSource subclasses do not reuse a BitArray which is too small. ........ r356 | dswitkin | 2008-04-11 12:30:54 -0700 (Fri, 11 Apr 2008) | 1 line Changed ProGuard settings so it will inline methods which use private members. This eliminates tens of thousands of function calls to BitArray.get() on a typical decode, and lots of other work as well. Overall we're roughly 20% faster by using ProGuard than turning it off. ........ r357 | dswitkin | 2008-04-11 13:25:09 -0700 (Fri, 11 Apr 2008) | 1 line Made the worker threads shut down synchronously to fix a race condition where the CameraManager could close the camera driver too soon. ........ r358 | dswitkin | 2008-04-11 14:16:08 -0700 (Fri, 11 Apr 2008) | 1 line Added 'T' as a shortcut to toggle debug method tracing using android.os.Debug and traceview for analysis. The traces are written to /sdcard, which means the SD Card must not be mounted as a volume by USB at the time. Tracing can slow down decoding by a factor of 5 or more but gives very useful insights into where the time is going. ........ r361 | dswitkin | 2008-04-15 15:34:49 -0700 (Tue, 15 Apr 2008) | 1 line A couple small improvements to the CameraManager. ........ r362 | srowen | 2008-04-15 17:27:36 -0700 (Tue, 15 Apr 2008) | 1 line Small simplification of build file condition properties using else attribute ........ r363 | srowen | 2008-04-15 17:34:13 -0700 (Tue, 15 Apr 2008) | 1 line Fix Issue 50, not building on Windows, by adding some small workarounds for Windows paths in build files for Android ........ r365 | dswitkin | 2008-04-17 13:09:17 -0700 (Thu, 17 Apr 2008) | 1 line Converted the Android client to use a status bar on the bottom of the screen instead of dialogs for a much better, less interrupting user experience. ........ r372 | dswitkin | 2008-04-21 11:11:02 -0700 (Mon, 21 Apr 2008) | 1 line Added some simple sharpening for 1D decoding which allowed a couple more blackbox images to pass. There were a few cases where the format or content is now misdetected, but since the net gain was positive I decided to make those non-fatal errors. In real world use the sharpening seems to help, and I think we can do even better with a better algorithm. ........ git-svn-id: http://zxing.googlecode.com/svn/trunk/android@374 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-03-28Updates to build on M5srowen1-15/+39
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@320 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-03-11Switch to RGB-based captures for decoding, in preparation for move to ↵srowen1-1/+1
continuous scan model git-svn-id: http://zxing.googlecode.com/svn/trunk/android@262 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-03-05Various code tweaks and refactorings suggested by IntelliJsrowen1-4/+4
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@246 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-02-14Biiig standardization of whitespace. 2 space indents now, no tabs.srowen1-34/+33
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@191 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-02-14This is the first version of the ZXing Android client.dswitkin1-0/+247
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@185 59b500cc-1b3d-0410-9834-0bbf25fbcc57