Socket
Socket
Sign inDemoInstall

phonegap-plugin-barcodescanner

Package Overview
Dependencies
0
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    phonegap-plugin-barcodescanner

You can use the BarcodeScanner plugin to scan different types of barcodes (using the device's camera) and get the metadata encoded in them for processing within your application.


Version published
Maintainers
6
Install size
6.30 MB
Created

Changelog

Source

[v6.0.7](https://github.com/* remote origin

Fetch URL: https://github.com//tree/v6.0.7) (2017-07-12) [Full Changelog](https://github.com/* remote origin Fetch URL: https://github.com//compare/v6.0.6...v6.0.7)

  • 6.0.7 [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/78dbf1cccb30935b832dc659eb377541edc52786)
  • :bookmark: Bumping plugin version to 6.0.7 [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/d0a2b4c52169553a86fc3fb5e00c0caa489d097d)
  • :wrench: update pluginpub version [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/fc7e3be16f3b1c811e5013f028bed934ebd7c9c1)
  • :apple: Issue #238: ios callbacks not called [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/e33e64ef462d00a95a0c6f3258a087f61f0e15da)
  • Merge pull request #431 from phonegap/ios-fix-426 [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/c65ba2f987838331eaa8a569b739515cad7a91e0)
  • :apple: Issue #340: iOS WebThreadLock crash on barcodeScanFailed [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/217d673644b6df96b175ce78ffa9cd8aee24135b)
  • Merge pull request #472 from jcesarmobile/beep-fix [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/8091c92f5e1e68e50f22fd171754a77740a76859)
  • :memo: Issue #470: PDF417 vs PDF_417, which one is valid [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/7ed5b212d25f2c0918e7ac0353cc3d59d8094a4c)
  • :fire: Removing these tests [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/54a28dd8871b81db810aed7df0a9909d71937b8b)
  • :wrench: Issue #473: Travis fails [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/68a2c5d9064bf927df0c5a862009d5b9812785b7)
  • :white_check_mark: Issue #473: Travis fails [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/2e335b82b7bd3ad9b7efc2c87adcb441c0d88bda)
  • Issue #330: Add a LICENSE file [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/a2f59f7adba728006c40dec431ecedf1c229f6e6)
  • :memo: Issue #471: README.md fix [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/cce5f050b8861dd05e6e8e0a03fc4b301ed3788f)
  • Fix beep [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/3cf20a6eb3397f3a2bb61a044c02f1e4810b5810)
  • Merge pull request #429 from jcesarmobile/pgb-usage-description [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/b5a135c6788e1a9ecb9f06a087931701f0b7a321)
  • Camera cannot focus due to wrong aspect ratio since plugin 6.0.5 #392 [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/04e0b3dadfe9aad8ec90e1d9480efe149f7e64f1)
  • [ios] re-add support for formats option [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/75ab7396d0e86b78188369d5f27a5c4fea602921)
  • Document usage description for phonegap build [view commit](http://github.com/* remote origin Fetch URL: https://github.com//commit/01a9f77961be74581fe25786c17e351026f1bbb5)

Change Log

6.0.5 (2016-12-22) Full Changelog

  • Flashlight default value #385, Turning off found plain text #259, Remove Result Prompt #234, Custom Result Messages #219 view commit
  • Flipping orientation on Android crashes app view commit
  • Focus improvements view commit
  • Crash on iOS on low memory devices view commit
  • Disable Animation view commit
  • Flashlight option view commit
  • Merge pull request #343 from cepm-nate/master view commit
  • Merge pull request #334 from lucatorella/patch-1 view commit
  • Merge pull request #346 from kunder-lab/master view commit
  • Catch Class not registered exception in case of missing Media Player view commit
  • Adds promise scan .done particularly to handle "No cameras" error view commit
  • Merge pull request #358 from vladimir-kotikov/explicit_intent view commit
  • Use explicit intent to launch scan activity view commit
  • Merge pull request #338 from jlowe234/master view commit
  • 6.0.2 view commit
  • Bumping plugin version to 6.0.2 view commit
  • Update pluginpub view commit
  • Merge pull request #303 from vladimir-kotikov/memory_consumption_fix view commit
  • Merge pull request #318 from vladimir-kotikov/surface3_crash view commit
  • Add contribution doc, issue and pull request templates view commit
  • Add editorconfig view commit
  • Setup CHANGELOG view commit
  • Setup regression tests view commit
  • Issue #270: OS 10 requires Camera permission reason view commit
  • Merge pull request #302 from jcesarmobile/add-permission-check view commit
  • Merge pull request #271 from EddyVerbruggen/master view commit
  • Merge pull request #307 from timkim/master view commit
  • Avoid crash on Surface3 view commit
  • Merge pull request #314 from ben-8409/master view commit
  • only set cdvMinSdkVersion if not set or smaller then 15. Fixes #275 view commit
  • Merge pull request #183 from stigok/readme-update view commit
  • Require camera view commit
  • [#277] - fix for crash on iOS switching cameras view commit
  • Crash fix view commit
  • Reduce memory consumption by using smaller video resolution view commit
  • iOS: Added permission ckeck and fail if it's not permited view commit
  • Updated version to 6.0.1 for release view commit
  • Merge pull request #285 from daserge/visibilitychange view commit
  • [Windows] Handled visibilitychange to avoid camera freeze on minimize view commit
  • Merge pull request #284 from daserge/version-bump view commit
  • Updated version to 6.0.0 for release view commit
  • https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/270 iOS 10 requires Camera permission reason view commit
  • Merge pull request #263 from daserge/check-arch view commit
  • Adds a windows pre compile/run hook to ensure an arch is specified view commit
  • Merge pull request #269 from daserge/win8-deprecation view commit
  • Merge pull request #256 from daserge/cleanup-on-events view commit
  • Retargeted WinRTBarcodeReader component, deprecated windows8 platform support view commit
  • Merge pull request #170 from jcesarmobile/callback-with-blocks view commit
  • send callbacks on dismissViewControllerAnimated completion view commit
  • Merge pull request #266 from daserge/multiple-focus-3 view commit
  • Merge pull request #267 from daserge/multiple-scan view commit
  • [Windows] Focus fails on multiple taps view commit
  • Prevent multiple calls to scanner view commit
  • [Windows] Cleanup camera on app suspension Save/restore scanning state on suspend/resume view commit
  • Merge pull request #260 from Telerik-Verified-Plugins/master view commit
  • Stable plugin id view commit
  • Stable plugin id - revert after PR view commit
  • Stable plugin id for PR view commit
  • Merge remote-tracking branch 'upstream/master' view commit
  • https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/40 https://github.com/phonegap/phonegap-plugin-barcodescanner/pull/171 view commit
  • Scanning crashes on Windows phone on device rotation view commit
  • Merge pull request #257 from daserge/multiple-focus-2 view commit
  • Added missing CHECK_PLAYING_TIMEOUT Added a timeout before initial focus to prevent focusAsync hang on slow devices view commit
  • Merge pull request #250 from daserge/multipleFocus view commit
  • [Windows] Focus fails on multiple taps, this closes #249 view commit
  • Merge pull request #251 from daserge/close-button view commit
  • Merge pull request #253 from daserge/win10-CameraStreamState view commit
  • Windows Mobile 10 - Close button does not work, this fixes #196 view commit
  • [Windows10] Fix The request is invalid in the current state view commit
  • Merge pull request #252 from daserge/css-fixes view commit
  • [Windows] CSS fixes - no-select, no-zoom, no-scroll view commit
  • Added a note about PGB view commit
  • Merge remote-tracking branch 'upstream/master' view commit
  • Merge remote-tracking branch 'upstream/master' view commit
  • #221 updated version to 5.0.0 for release view commit
  • stable plugin id view commit
  • Merge pull request #217 from Telerik-Verified-Plugins/merge-phonegap-official view commit
  • Bump plugin version to 4.2.0 view commit
  • Fix iOS issues after merge view commit
  • Fixing Android after merge view commit
  • Re-added old platform files we removed after forking Wildabeast view commit
  • Merge remote-tracking branch 'upstream/master' into merge-phonegap-official view commit
  • fix Android M permission view commit
  • merge view commit
  • #28 Plugin renaming my app view commit
  • #28 Plugin renaming my app view commit
  • #10 Warnings on IOS 8.4 when using library view commit
  • #26 App crashes if the CordovaActivity is stopped during scanning - Moved scan to a background thread so it won't block the UI for about 50ms while initiating the scanner view commit
  • Documented the new "orientation" feature for Android view commit
  • This fixes a few issues in our fork: Image upside down on tablet #20 Android UI doesn't support Portrait and is small #4 Prebuilt Zebra Crossing (xzing) Library #3 Forcing landscape on camera android #17 view commit
  • Merge pull request #206 from sarangan12/Windows10Fix view commit
  • Fix for the crash in Windows 10 view commit
  • #25 iOS app scans randomly UPC and other EAN formats when scanning EAN-13 view commit
  • #14 Cannot read code_128 barcodes in iOS view commit
  • Update README.md view commit
  • Fixes Windows Mobile - Issue with Orientation view commit
  • Merge pull request #168 from MSOpenTech/escape_fix view commit
  • Fix plugin installation failure in VS2015 view commit
  • Merge pull request #135 from MSOpenTech/windows_refactor view commit
  • Refactor windows implementation in promise manner view commit
  • Merge pull request #134 from MSOpenTech/orientation_change view commit
  • Add support for orientation change from #62 and #97 view commit
  • Resolve merge conflicts and address feedback for #62 view commit
  • fixing issues for windows platform view commit
  • Merge pull request #132 from MSOpenTech/windows_barcode_format_fix view commit
  • Correct scan result to expose format name instead of format code. view commit
  • Add information about windows 10 support to README view commit
  • Removes intermediate winmd component from Win10 implementation view commit
  • Add Windows 10 Support view commit
  • Merge pull request #131 from MSOpenTech/backbutton-fix view commit
  • Improve native look and feel for windows platform view commit
  • Merge pull request #128 from MSOpenTech/autofocus-fix view commit
  • Rework autofocus logic for windows. This fixes #41 view commit
  • Merge pull request #127 from timwindsor/barcodeEncodeBB view commit
  • Merge branch 'master' into barcodeEncodeBB view commit
  • comments view commit
  • added data type check, and uri prepending for encode method view commit
  • error checking, data validation view commit
  • qrcode encode working view commit
  • encode method or blackberry view commit
  • Use maven reference to android-support-v4 library view commit
  • bump view commit
  • fixes #162 button bar not working in ios8 view commit
  • #15 Android M (6) compatibility view commit
  • #15 Android M (6) compatibility view commit
  • 4.1.0 view commit
  • updated to version 4.1.0 view commit
  • Ignore linting view commit
  • Removing custom strings view commit
  • Merge pull request #78 from timwindsor/master view commit
  • Merge remote-tracking branch 'phonegap/master' view commit
  • revert obsolete workaround. Fixes delayed error. view commit
  • Parses result so it's consistent with other platforms. Removes obsolete, unused file. view commit
  • #13 Cordova-iOS 4 support view commit
  • #11 PDF417 support on Android. Version bump. view commit
  • #11 PDF417 support on Android view commit
  • updated version in plugin.xml view commit
  • 4.0.2 view commit
  • Merge pull request #66 from olimortimer/patch-1 view commit
  • Merge pull request #52 from nlsdg/patch-1 view commit
  • Fixed iPhone / iPod scanning issue view commit
  • Add BlackBerry namespace view commit
  • Update README.md view commit
  • 4.0.1 view commit
  • #48 fixed version in plugin.xml view commit
  • 4.0.0 view commit
  • Merge pull request #32 from timwindsor/master view commit
  • Adds blackberry10 to package.json view commit
  • Merge pull request #1 from timwindsor/master view commit
  • Completes merge of BB10 implementation into phonegap API view commit
  • Unifying API for BlackBerry10 view commit
  • Restore location of BlackBerry repo view commit
  • Restore location of iOS and Android repositories view commit
  • Merge in BlackBerry 10 support view commit
  • indentation fix view commit
  • stopRead error handling view commit
  • Merges in BlackBerry 10 support view commit
  • Android 'encode' crashes view commit
  • bump view commit
  • Android 'encode' crashes view commit
  • Ugh, AB build errors because of lint config view commit
  • Ugh, AB build errors because of lint config view commit
  • V3.1.2 view commit
  • Merge pull request #7 from mlaponder/master view commit
  • Update version to 3.1.1 view commit
  • 3.1.1 view commit
  • Merge pull request #6 from mlaponder/master view commit
  • Fix incorrect uri for wp8 view commit
  • 3.1.0 view commit
  • updated to version 3.1.0 view commit
  • Merge pull request #4 from komola/master view commit
  • fixed issue with readme view commit
  • added travis-ci support view commit
  • fixed tests, made compatible with cordova-test-framework and paramedic view commit
  • Merge pull request #5 from stevengill/master view commit
  • updated ID to phonegap-plugin-barcodescanner, V3.0.0 view commit
  • removed cordova.define from js view commit
  • Merge pull request #1 from trongrg/master view commit
  • Updated src/android/com.google.zxing.client.android.captureactivity.jar view commit
  • Remove unnecessary retain calls view commit
  • [#4] Android UI doesn't support Portrait and is small - support for tablets with default landscape orientation view commit
  • [#4] Android UI doesn't support Portrait and is small - support for tablets with default landscape orientation view commit
  • [#4] Android UI doesn't support Portrait and is small - support for 320x240 screens view commit
  • [#4] Android UI doesn't support Portrait and is small - portrait scanning of non-QR codes didn't work view commit
  • [#4] Android UI doesn't support Portrait and is small - support Android projects which have not set targetSDK (crashed without it) view commit
  • [#4] Android UI doesn't support Portrait and is small view commit
  • Restore MultiFormat Reader view commit
  • Merge pull request #1 from MSOpenTech/2.1-windows view commit
  • Include winmd source as subproject instead of prebuilt winmd view commit
  • Merge pull request #2 from MSOpenTech/2.0-wp8 view commit
  • Check if the last n scans returned the same result and only then accept the code view commit
  • windows: fixes "class not registered" error view commit
  • #616 Use single proxy for both windows8 and windows view commit
  • #616 Adds support for windows platform view commit
  • Windows Phone 8.0 improvements and bugfixes: view commit
  • v2.2.0 view commit
  • added support for adding config parameter which is passed to barcode scanner activity view commit
  • Restrict to EAN13 view commit
  • v2.1.0 view commit
  • Played beep sound after scan succeeded. view commit
  • iOS update encode method return format view commit
  • Add QR code encoder implementation for IOS view commit
  • fixes #162 button bar not working in ios8 view commit
  • fixed size to int conversion and cordova 3.6 deprecation warnings for iOS view commit
  • Removed ARC code view commit
  • Version bump view commit
  • Merge pull request #9 from galexandrov/master view commit
  • Remove unnecessary retain calls view commit
  • up version to 2.0.1 view commit
  • [#4] Android UI doesn't support Portrait and is small - support for tablets with default landscape orientation view commit
  • [#4] Android UI doesn't support Portrait and is small - support for tablets with default landscape orientation view commit
  • [#4] Android UI doesn't support Portrait and is small - support for 320x240 screens view commit
  • Support browser. encode is NOT ready yet. view commit
  • [#4] Android UI doesn't support Portrait and is small - portrait scanning of non-QR codes didn't work view commit
  • [#4] Android UI doesn't support Portrait and is small - support Android projects which have not set targetSDK (crashed without it) view commit
  • [#4] Android UI doesn't support Portrait and is small view commit
  • Documented new features view commit
  • Merge pull request #2 from EddyVerbruggen/master view commit
  • Added option to select choose to show a 'flip camera' button (default: false) view commit
  • Added option to select frontcamera via JS api view commit
  • added repo + issue tags view commit
  • Upped version to 2.0.0 view commit
  • [readme] fix encode example code view commit
  • Enabled ITF support view commit
  • Added support for front face camera. Signed-off-by: Emil Marashliev marashliev@gmail.com view commit
  • Updated link to Cordova plugin spec to fix 404 view commit
  • Updated README links to the original iOS and Android repos to fix 404 errors view commit
  • avoid calling other apps activity view commit
  • [plugin.xml] updated description view commit
  • [plugin-xml] upped version to 1.2.0 view commit
  • Adds documentation for Windows Phone 8 view commit
  • Adds support for Windows phone 8.0 view commit
  • Adds documentation for Windows8. view commit
  • Adds Windows8 implementation (scan method only) view commit
  • [1.1.0] upped version view commit
  • [js] plugin.xml asset backwards compat view commit
  • Compiled jar view commit
  • Added a flip-camera button for Android - missing icon view commit
  • Added a flip-camera button for Android - missing icon view commit
  • Added a flip-camera button for Android view commit
  • Front camera scanning for iOS ([#108]) deserves a version bump view commit
  • Added support for front face camera. Signed-off-by: Emil Marashliev marashliev@gmail.com view commit
  • avoid calling other apps activity view commit
  • [plugin.xml] updated description view commit
  • Change plugin.xml to use framework element view commit
  • Change barcode scanner to work similar to the iOS and Android versions. In plugin.xml added reference to ZXing.Net so it is refered as plugin is installed. Similar to other platforms' versions, there is a focus area - only this area is scanned for barcodes. view commit
  • removed unused reference view commit
  • [1.2.0] upped version view commit
  • ignore Intellij module files view commit
  • Updated Plugin, refactored some library parts, added description to read me view commit
  • added windows phone version view commit
  • window.plugins is not defined anymore, replaced it with cordova.plugins view commit
  • Add missing iOS framework "QuartzCore" to plugin.xml view commit
  • [plugin.xml] corrected supported cordova versions view commit
  • delete plugin.xml.generate.php view commit
  • Use <js-module> in favour of <asset> for the JS view commit
  • [readme] fixed encode syntax typo view commit
  • [android][0.7.2] remove busted menu items + fixes #11 view commit
  • [0.7.1] upped version view commit
  • [README] fix typo view commit
  • Merge branch 'ios_warnings' of https://github.com/agrieve/BarcodeScanner into agrive-ios_warnings view commit
  • Use <js-module> in favour of <asset> for the JS. view commit
  • Fix plugin for iOS on Cordova 3.0 by disabling ARC and using newer plugin signature. view commit
  • Fix some compile warnings on iOS view commit
  • [0.7.0] upped version view commit
  • Cordova 2.8 view commit
  • minor view commit
  • Merge remote-tracking branch 'upstream/master' view commit
  • ident view commit
  • Encode object access fix. view commit
  • 3.0 fixed README.md view commit
  • typo view commit
  • Fix for https://issues.apache.org/jira/browse/CB-4379 view commit
  • Changes for crodova 3.0 view commit
  • PG 3.0 changes view commit
  • [readme] correct ios supported formats view commit
  • [readme] plugman not pluginstall view commit
  • [0.6.0] upped version view commit
  • app_name fix view commit
  • Update README.md view commit
  • minor refactoring ;-) view commit
  • plugin spec. update view commit
  • Update to 4.3.1 view commit
  • [plugin.xml] update license tag view commit
  • [plugin.xml] license tag view commit
  • Merge branch 'master' of https://github.com/Eccenux/BarcodeScanner view commit
  • app_name fix view commit
  • Update README.md view commit
  • minor refactoring ;-) view commit
  • plugin spec. update view commit
  • [0.5.4] upped version view commit
  • Update to 4.3.1 view commit
  • Merge branch 'master' of github.com:wildabeast/BarcodeScanner view commit
  • [readme] reference plugman not pluginstall view commit
  • [plugin-xml] added engines view commit
  • [plugin-xml] Add description view commit
  • [readme] reference plugman not pluginstall view commit
  • [plugin-xml] added engines view commit
  • [0.5.3] upped version view commit
  • [spec] update specs to cordova.require/define view commit
  • [plugman] plugman don't like spec/config.xml view commit
  • [plugin-xml] Add description view commit
  • [0.5.3] upped version view commit
  • [spec] update specs to cordova.require/define view commit
  • [plugman] plugman don't like spec/config.xml view commit
  • [js] cordova.require instead of PhoneGap.require view commit
  • [readme] formatting view commit
  • [js] cordova.require instead of PhoneGap.require view commit
  • [readme] formatting view commit
  • [spec] FIXED IT view commit
  • [spec] 2.5.0 view commit
  • [spec] removing a maybe bunk spec view commit
  • [spec] removing filsystem init view commit
  • [spec] more specs view commit
  • [spec] formatting for medic view commit
  • [spec] app id view commit
  • [spec] Fixed spec view commit
  • [spec] app id, title view commit
  • [spec] fixing spec app view commit
  • [spec] add barcodescanner.js view commit
  • [spec] Initial version of spec view commit
  • Do not copy the scanned barcode to the clipboard. view commit
  • readme fix view commit
  • Update for Cordova/PhoneGap 2.0 plugins (http://simonmacdonald.blogspot.ca/2012/08/so-you-wanna-write-phonegap-200-android.html) view commit
  • fix for a java ref view commit
  • full paths for android view commit
  • fully qualified paths view commit
  • Merge pull request #3 from filmaj/master view commit
  • fix for a java ref view commit
  • full paths for android view commit
  • fully qualified paths view commit
  • [spec] FIXED IT view commit
  • [spec] 2.5.0 view commit
  • [spec] removing a maybe bunk spec view commit
  • [spec] removing filsystem init view commit
  • [spec] more specs view commit
  • [spec] formatting for medic view commit
  • [spec] app id view commit
  • [spec] Fixed spec view commit
  • [spec] app id, title view commit
  • [spec] fixing spec app view commit
  • [spec] add barcodescanner.js view commit
  • [spec] Initial version of spec view commit
  • update BarcodeScanner plugin for 2.5.0+ view commit
  • Merge pull request #14 from jwark/do_not_copy_to_clipboard view commit
  • update BarcodeScanner plugin for 2.5.0+ view commit
  • Do not copy the scanned barcode to the clipboard. view commit
  • Merge pull request #7 from JaysonRaymond/master view commit
  • [iOS][2.3.0] add plugin to config.xml for 2.3.0+ + upped version to 0.3.0 view commit
  • readme fix view commit
  • Update for Cordova/PhoneGap 2.0 plugins (http://simonmacdonald.blogspot.ca/2012/08/so-you-wanna-write-phonegap-200-android.html) view commit
  • [0.2.2] updated version view commit
  • [ios] Fixes AVCaptureSession leak, thanks @markus-olsson view commit
  • [android] syntax error, missing else view commit
  • [0.2.1][ios] lock scanner to portrait view commit
  • [0.2.0] updated version view commit
  • [ios] lock scanner orientation to portrait view commit
  • [0.1.2] version update view commit
  • [ios] Integrated shazron's iOS6 orientation updates view commit
  • [version] updated to 0.1.1 view commit
  • [android] Removed app_name string resource view commit
  • [readme] corrected supported types for iOS view commit
  • [readme] view commit
  • [readme] view commit
  • [0.1.0] version updated view commit
  • [android] Added translated resource files view commit
  • [android] Modified zxing client to access resources from main package view commit
  • [android][plugin-xml] Added resource files view commit
  • [android] Added Zxing Library project view commit
  • [gitignore] view commit
  • [readme] license view commit
  • [plugin-xml] fixed up plugin.xml view commit
  • [ios] removed CORDOVA_FRAMEWORK ref view commit
  • Initial commit. Zeppelin rules. view commit
  • Initial commit view commit

Readme

Source

PhoneGap Plugin BarcodeScanner

================================

Build Status

Cross-platform BarcodeScanner for Cordova / PhoneGap.

Follows the Cordova Plugin spec, so that it works with Plugman.

Installation

This requires phonegap 5.0+ ( current stable v3.0.0 )

phonegap plugin add phonegap-plugin-barcodescanner

Older versions of phonegap can still install via the deprecated id ( stale v2.0.1 )

phonegap plugin add com.phonegap.plugins.barcodescanner

It is also possible to install via repo url directly ( unstable )

phonegap plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner.git

Supported Platforms

  • Android
  • iOS
  • Windows (Windows/Windows Phone 8.1 and Windows 10)
  • Windows Phone 8
  • BlackBerry 10
  • Browser

Note: the Android source for this project includes an Android Library Project. plugman currently doesn't support Library Project refs, so its been prebuilt as a jar library. Any updates to the Library Project should be committed with an updated jar.

Note: Windows 10 applications can not be build for AnyCPU architecture, which is default for Windows platform. If you want to build/run Windows 10 app, you should specify target architecture explicitly, for example (Cordova CLI):

cordova run windows -- --archs=x86

Note: Since iOS 10 it's mandatory to add a NSCameraUsageDescription in the info.plist.

NSCameraUsageDescription describes the reason that the app accesses the user’s camera. When the system prompts the user to allow access, this string is displayed as part of the dialog box.

To add this entry you can pass the following variable on plugin install.

cordova plugin add phonegap-plugin-barcodescanner --variable CAMERA_USAGE_DESCRIPTION="To scan barcodes"

If you are using Phonegap Build you can add this to your config.xml

<gap:config-file platform="ios" parent="NSCameraUsageDescription" overwrite="true">
   <string>We are using the Camera for something..</string>
</gap:config-file>

PhoneGap Build

If you're using PhoneGap Build please make sure you specify gradle as your Android build tool in config.xml: <preference name="android-build-tool" value="gradle" />.

Using the plugin

The plugin creates the object cordova.plugins.barcodeScanner with the method scan(success, fail).

The following barcode types are currently supported:

Android

  • QR_CODE
  • DATA_MATRIX
  • UPC_E
  • UPC_A
  • EAN_8
  • EAN_13
  • CODE_128
  • CODE_39
  • CODE_93
  • CODABAR
  • ITF
  • RSS14
  • RSS_EXPANDED

Not by default, but supported if you pass in the "formats" option:

  • PDF_417
  • AZTEC

iOS

  • QR_CODE
  • DATA_MATRIX
  • UPC_E
  • UPC_A
  • EAN_8
  • EAN_13
  • CODE_128
  • CODE_39
  • ITF

Windows

  • UPC_A
  • UPC_E
  • EAN_8
  • EAN_13
  • CODE_39
  • CODE_93
  • CODE_128
  • ITF
  • CODABAR
  • MSI
  • RSS14
  • QR_CODE
  • DATA_MATRIX
  • AZTEC
  • PDF_417

Windows Phone 8

  • UPC_A
  • UPC_E
  • EAN_8
  • EAN_13
  • CODE_39
  • CODE_93
  • CODE_128
  • ITF
  • CODABAR
  • MSI
  • RSS14
  • QR_CODE
  • DATA_MATRIX
  • AZTEC
  • PDF_417

BlackBerry 10

  • UPC_A
  • UPC_E
  • EAN_8
  • EAN_13
  • CODE_39
  • CODE_128
  • ITF
  • DATA_MATRIX
  • AZTEC

success and fail are callback functions. Success is passed an object with data, type and cancelled properties. Data is the text representation of the barcode data, type is the type of barcode detected and cancelled is whether or not the user cancelled the scan.

A full example could be:

   cordova.plugins.barcodeScanner.scan(
      function (result) {
          alert("We got a barcode\n" +
                "Result: " + result.text + "\n" +
                "Format: " + result.format + "\n" +
                "Cancelled: " + result.cancelled);
      },
      function (error) {
          alert("Scanning failed: " + error);
      },
      {
          preferFrontCamera : true, // iOS and Android
          showFlipCameraButton : true, // iOS and Android
          showTorchButton : true, // iOS and Android
          torchOn: true, // Android, launch with the torch switched on (if available)
          prompt : "Place a barcode inside the scan area", // Android
          resultDisplayDuration: 500, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
          formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
          orientation : "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
          disableAnimations : true, // iOS
          disableSuccessBeep: false // iOS
      }
   );

Encoding a Barcode

The plugin creates the object cordova.plugins.barcodeScanner with the method encode(type, data, success, fail).

Supported encoding types:

  • TEXT_TYPE
  • EMAIL_TYPE
  • PHONE_TYPE
  • SMS_TYPE
A full example could be:

   cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, "http://www.nytimes.com", function(success) {
            alert("encode success: " + success);
          }, function(fail) {
            alert("encoding failed: " + fail);
          }
        );

Windows quirks

  • Windows implementation currently doesn't support encode functionality.

  • On Windows 10 desktop ensure that you have Windows Media Player and Media Feature pack installed.

Windows Phone 8 quirks

Windows Phone 8 implementation currently doesn't support encode functionality.

BlackBerry 10 quirks

BlackBerry 10 implementation currently doesn't support encode functionality. Cancelling a scan on BlackBerry 10 is done by touching the screen.

Thanks on Github

So many -- check out the original iOS, Android and BlackBerry 10 repos.

Licence

The MIT License

Copyright (c) 2010 Matt Kane

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 12 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc