Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codes that have space is getting only the first part #338

Open
wants to merge 208 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
039d1d0
added windows phone version
huserben Nov 9, 2013
719f19d
Updated Plugin, refactored some library parts, added description to r…
huserben Nov 9, 2013
1654970
ignore Intellij module files
EddyVerbruggen Jun 26, 2014
53ad095
[1.2.0] upped version
Nov 27, 2013
05a5a17
removed unused reference
huserben Nov 30, 2013
3a377ef
Change barcode scanner to work similar to the iOS and Android version…
nadyaA Feb 19, 2014
619f698
Change plugin.xml to use framework element
nadyaA Apr 9, 2014
cfa698d
[plugin.xml] updated description
Dec 12, 2013
ef1155d
avoid calling other apps activity
Eccenux Jan 5, 2014
d3c8ad2
Added support for front face camera. Signed-off-by: Emil Marashliev …
emarashliev Apr 22, 2014
98f158a
Front camera scanning for iOS ([#108]) deserves a version bump
EddyVerbruggen Jul 24, 2014
1a2b8c6
Added a flip-camera button for Android
EddyVerbruggen Jul 26, 2014
48be871
Added a flip-camera button for Android
EddyVerbruggen Jul 26, 2014
332f12f
Added a flip-camera button for Android
EddyVerbruggen Jul 26, 2014
c93d756
Compiled jar
EddyVerbruggen Jul 26, 2014
80a8285
Added option to select frontcamera via JS api
EddyVerbruggen Aug 14, 2014
9f19420
Added option to select choose to show a 'flip camera' button (default…
EddyVerbruggen Aug 14, 2014
5f37fb1
Merge pull request #2 from EddyVerbruggen/master
EddyVerbruggen Aug 31, 2014
8b9d6a5
Documented new features
EddyVerbruggen Aug 31, 2014
b163ab6
[#4] Android UI doesn't support Portrait and is small
EddyVerbruggen Oct 8, 2014
20799f1
[#4] Android UI doesn't support Portrait and is small - support Andro…
EddyVerbruggen Oct 8, 2014
fe77464
[#4] Android UI doesn't support Portrait and is small - portrait scan…
EddyVerbruggen Oct 9, 2014
7e60c7c
[#4] Android UI doesn't support Portrait and is small - support for 3…
EddyVerbruggen Oct 10, 2014
d0aa7d7
[#4] Android UI doesn't support Portrait and is small - support for t…
EddyVerbruggen Oct 16, 2014
044de26
[#4] Android UI doesn't support Portrait and is small - support for t…
EddyVerbruggen Oct 17, 2014
a44f740
Remove unnecessary retain calls
Mar 19, 2015
35ad6da
Merge pull request #9 from galexandrov/master
EddyVerbruggen Mar 19, 2015
30236cd
Version bump
EddyVerbruggen Mar 19, 2015
c5cf295
Ugh, AB build errors because of lint config
EddyVerbruggen Jun 12, 2015
31a7ebf
Ugh, AB build errors because of lint config
EddyVerbruggen Jun 12, 2015
3632edc
Android 'encode' crashes
EddyVerbruggen Jun 12, 2015
c484e0a
bump
EddyVerbruggen Jun 12, 2015
1feb36d
Android 'encode' crashes
EddyVerbruggen Jun 12, 2015
7175796
Add BlackBerry namespace
nlsdg Aug 17, 2015
c92bc8a
Fixed iPhone / iPod scanning issue
Aug 28, 2015
001a1be
Merge pull request #52 from nlsdg/patch-1
stevengill Aug 28, 2015
346472f
Merge pull request #66 from olimortimer/patch-1
stevengill Aug 28, 2015
07322cb
4.0.2
stevengill Aug 28, 2015
74f33d5
updated version in plugin.xml
stevengill Aug 28, 2015
e413345
#11 PDF417 support on Android
EddyVerbruggen Sep 7, 2015
009175b
#11 PDF417 support on Android. Version bump.
EddyVerbruggen Sep 7, 2015
de5700c
#13 Cordova-iOS 4 support
EddyVerbruggen Sep 7, 2015
0632e34
Parses result so it's consistent with other platforms. Removes obsole…
timwindsor Sep 16, 2015
b8f2fa5
revert obsolete workaround. Fixes delayed error.
timwindsor Sep 16, 2015
28174b1
Merge remote-tracking branch 'phonegap/master'
timwindsor Sep 16, 2015
940e98b
Merge pull request #78 from timwindsor/master
stevengill Sep 23, 2015
607efeb
Removing custom strings
EddyVerbruggen Oct 6, 2015
64845f4
Ignore linting
EddyVerbruggen Oct 6, 2015
6452c98
updated to version 4.1.0
stevengill Oct 19, 2015
6b5f7fb
4.1.0
stevengill Oct 19, 2015
f028ec4
#15 Android M (6) compatibility
EddyVerbruggen Oct 27, 2015
82bd97e
#15 Android M (6) compatibility
EddyVerbruggen Oct 27, 2015
1f51bb9
fixes #162 button bar not working in ios8
EddyVerbruggen Nov 14, 2015
df12102
bump
EddyVerbruggen Nov 14, 2015
fb0a4f8
Use maven reference to android-support-v4 library
Nov 27, 2015
c662c85
encode method or blackberry
scheideman Nov 27, 2015
2830a6d
qrcode encode working
scheideman Nov 30, 2015
d5e84c9
error checking, data validation
scheideman Dec 2, 2015
1cf6376
added data type check, and uri prepending for encode method
scheideman Dec 4, 2015
2219f19
comments
scheideman Dec 4, 2015
d9f4795
Merge branch 'master' into barcodeEncodeBB
timwindsor Dec 15, 2015
f4d5d5c
Merge pull request #127 from timwindsor/barcodeEncodeBB
timwindsor Dec 15, 2015
a905251
Rework autofocus logic for windows. This fixes #41
vladimir-kotikov Dec 15, 2015
4606ac6
Merge pull request #128 from MSOpenTech/autofocus-fix
Dec 21, 2015
23b4343
Improve native look and feel for windows platform
vladimir-kotikov Dec 17, 2015
9dec84c
Merge pull request #131 from MSOpenTech/backbutton-fix
Dec 21, 2015
9c2da01
Add Windows 10 Support
RyanWFiorini Nov 20, 2015
521d427
Removes intermediate winmd component from Win10 implementation
vladimir-kotikov Dec 22, 2015
b25d710
Add information about windows 10 support to README
vladimir-kotikov Dec 22, 2015
dc84cac
Correct scan result to expose format name instead of format code.
vladimir-kotikov Dec 22, 2015
8b5739f
Merge pull request #132 from MSOpenTech/windows_barcode_format_fix
Dec 22, 2015
d68cdce
fixing issues for windows platform
vladyslav571 Aug 26, 2015
cabb67e
Resolve merge conflicts and address feedback for #62
vladimir-kotikov Dec 23, 2015
51216ff
Add support for orientation change from #62 and #97
vladimir-kotikov Dec 23, 2015
02c67a2
Merge pull request #134 from MSOpenTech/orientation_change
Dec 23, 2015
0d01bde
Refactor windows implementation in promise manner
vladimir-kotikov Dec 23, 2015
e22581c
Merge pull request #135 from MSOpenTech/windows_refactor
Dec 23, 2015
4c0dcf4
Fix plugin installation failure in VS2015
vladimir-kotikov Jan 6, 2016
d1dcfe0
Merge pull request #168 from MSOpenTech/escape_fix
Feb 11, 2016
3834067
Fixes Windows Mobile - Issue with Orientation
SunboX Jan 20, 2016
b8ea34e
Update README.md
stigok Mar 12, 2016
c067303
#14 Cannot read code_128 barcodes in iOS
EddyVerbruggen Apr 9, 2016
dde3c19
#25 iOS app scans randomly UPC and other EAN formats when scanning EA…
EddyVerbruggen Apr 10, 2016
8e46fcb
Fix for the crash in Windows 10
sarangan12 Apr 11, 2016
2a5e289
Merge pull request #206 from sarangan12/Windows10Fix
Apr 12, 2016
25e00cd
This fixes a few issues in our fork:
EddyVerbruggen Apr 16, 2016
8dea274
Documented the new "orientation" feature for Android
EddyVerbruggen Apr 16, 2016
d0bf407
#26 App crashes if the CordovaActivity is stopped during scanning
EddyVerbruggen Apr 22, 2016
57babcc
#10 Warnings on IOS 8.4 when using library
EddyVerbruggen Apr 22, 2016
1778bee
#28 Plugin renaming my app
EddyVerbruggen Apr 23, 2016
55b716a
#28 Plugin renaming my app
EddyVerbruggen Apr 23, 2016
f0ad027
merge
EddyVerbruggen May 2, 2016
29d3308
fix Android M permission
JrontEnd Apr 21, 2016
6a7d720
Merge remote-tracking branch 'upstream/master' into merge-phonegap-of…
EddyVerbruggen May 2, 2016
172f164
Re-added old platform files we removed after forking Wildabeast
EddyVerbruggen May 2, 2016
5641c8e
Fixing Android after merge
EddyVerbruggen May 2, 2016
06f4a7d
Fix iOS issues after merge
EddyVerbruggen May 4, 2016
0cda49b
Bump plugin version to 4.2.0
EddyVerbruggen May 2, 2016
bd6c295
Merge pull request #217 from Telerik-Verified-Plugins/merge-phonegap-…
vladimir-kotikov May 5, 2016
762dea0
stable plugin id
EddyVerbruggen May 5, 2016
27227e9
#221 updated version to 5.0.0 for release
stevengill May 5, 2016
d4b22bb
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen May 6, 2016
ce0cf94
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen May 6, 2016
b20c046
Added a note about PGB
EddyVerbruggen May 9, 2016
5364553
[Windows] CSS fixes - no-select, no-zoom, no-scroll
Jun 4, 2016
a3d4dfa
Merge pull request #252 from daserge/css-fixes
Jun 6, 2016
2a3e4fd
[Windows10] Fix The request is invalid in the current state
Jun 6, 2016
942d1ed
Windows Mobile 10 - Close button does not work, this fixes #196
Jun 2, 2016
5161af4
Merge pull request #253 from daserge/win10-CameraStreamState
Jun 8, 2016
128c80f
Merge pull request #251 from daserge/close-button
Jun 8, 2016
b836297
[Windows] Focus fails on multiple taps, this closes #249
Jun 3, 2016
e65272a
Merge pull request #250 from daserge/multipleFocus
Jun 9, 2016
eb31d2e
Added missing CHECK_PLAYING_TIMEOUT
Jun 3, 2016
45ec98f
Merge pull request #257 from daserge/multiple-focus-2
Jun 14, 2016
c3bcd87
Scanning crashes on Windows phone on device rotation
Jun 15, 2016
e9f1b1b
https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/40
EddyVerbruggen Jun 17, 2016
c0546f7
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen Jun 17, 2016
73c32f4
Stable plugin id for PR
EddyVerbruggen Jun 17, 2016
be3e490
Stable plugin id - revert after PR
EddyVerbruggen Jun 17, 2016
363335c
Stable plugin id
EddyVerbruggen Jun 17, 2016
55e6938
Merge pull request #260 from Telerik-Verified-Plugins/master
EddyVerbruggen Jun 17, 2016
6f9086c
Stable plugin id - revert
EddyVerbruggen Jun 17, 2016
49489db
[Windows] Cleanup camera on app suspension
Jun 15, 2016
2aa5bdc
Prevent multiple calls to scanner
wodka Jun 22, 2016
f18ed1a
[Windows] Focus fails on multiple taps
Jun 22, 2016
78a5345
Merge pull request #267 from daserge/multiple-scan
Jun 23, 2016
d92af72
Merge pull request #266 from daserge/multiple-focus-3
Jun 23, 2016
21152cf
send callbacks on dismissViewControllerAnimated completion
jcesarmobile Feb 12, 2016
ae9f6e2
Merge pull request #170 from jcesarmobile/callback-with-blocks
jcesarmobile Jun 23, 2016
eba7eb3
Retargeted WinRTBarcodeReader component, deprecated windows8 platform…
Jun 24, 2016
d3344f2
Merge pull request #256 from daserge/cleanup-on-events
Jun 24, 2016
865e1b6
Merge pull request #269 from daserge/win8-deprecation
Jun 24, 2016
49e33a8
Adds a windows pre compile/run hook to ensure an arch is specified
Jun 19, 2016
dd85e25
Merge pull request #263 from daserge/check-arch
Jun 24, 2016
2895b3b
https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/270…
EddyVerbruggen Jun 27, 2016
0f534db
Updated version to 6.0.0 for release
Jul 12, 2016
11dd6b5
Merge pull request #284 from daserge/version-bump
Jul 12, 2016
005c303
[Windows] Handled visibilitychange to avoid camera freeze on minimize
Jul 12, 2016
9d4a961
Merge pull request #285 from daserge/visibilitychange
Jul 15, 2016
3cf975b
Updated version to 6.0.1 for release
Jul 15, 2016
59301af
iOS: Added permission ckeck and fail if it's not permited
jcesarmobile Aug 3, 2016
89a9c69
Reduce memory consumption by using smaller video resolution
vladimir-kotikov Aug 8, 2016
7841f6d
Crash fix
aserraric Jul 1, 2016
6c3d74d
[#277] - fix for crash on iOS switching cameras
timkim Aug 15, 2016
5e58c0a
Require camera
macdonst Jul 20, 2016
97a2991
Merge pull request #183 from stigok/readme-update
macdonst Aug 19, 2016
a5a578e
Fix path to BarcodeScannerUI.xaml
TomaNikolov Aug 22, 2016
59a1db1
Merge pull request #40 from Telerik-Verified-Plugins/tnikolov/fix-wp8…
EddyVerbruggen Aug 23, 2016
3ee4e55
Bump plugin version to 5.0.2
Aug 26, 2016
5513f5c
only set cdvMinSdkVersion if not set or smaller then 15. Fixes #275
Aug 30, 2016
2af6324
Merge pull request #314 from ben-8409/master
EddyVerbruggen Aug 30, 2016
1473daa
Avoid crash on Surface3
vladimir-kotikov Sep 1, 2016
d775cc7
Merge pull request #307 from timkim/master
macdonst Sep 5, 2016
8004584
Merge pull request #271 from EddyVerbruggen/master
macdonst Sep 5, 2016
7dd0e84
Merge pull request #302 from jcesarmobile/add-permission-check
jcesarmobile Sep 6, 2016
380a56a
Issue #270: OS 10 requires Camera permission reason
macdonst Sep 7, 2016
4d6ee25
Setup regression tests
macdonst Sep 8, 2016
1c2491d
Setup CHANGELOG
macdonst Sep 8, 2016
c33c2ab
Add editorconfig
macdonst Sep 8, 2016
31d9bad
Add contribution doc, issue and pull request templates
macdonst Sep 8, 2016
4fffc8d
Merge pull request #318 from vladimir-kotikov/surface3_crash
macdonst Sep 8, 2016
631ab8f
Merge pull request #303 from vladimir-kotikov/memory_consumption_fix
macdonst Sep 8, 2016
ca49732
Update pluginpub
macdonst Sep 8, 2016
8728015
Bumping plugin version to 6.0.2
macdonst Sep 8, 2016
18f9587
6.0.2
macdonst Sep 8, 2016
f06a0b0
Update CHANGELOG
macdonst Sep 8, 2016
f81c88c
Update CDVbcsProcessor for #312
jlowe234 Sep 16, 2016
c47b54d
Fixed undefined permission
jcesarmobile Sep 20, 2016
df54d51
Merge pull request #331 from jcesarmobile/undefined-permission
jcesarmobile Sep 20, 2016
e23d82d
Adding explicit casting
lucatorella Sep 29, 2016
e7f3ed3
Merge remote-tracking branch 'refs/remotes/phonegap/master'
Oct 4, 2016
ffe86e0
Added new codes
Oct 4, 2016
68e7c05
Merge pull request #1 from jlowe234/newcodes
jlowe234 Oct 4, 2016
3929d9e
Disable openDialog barcodeScanDone animations
cepm-nate Oct 14, 2016
d65a734
Merge pull request #1 from cepm-nate/disableAnimation
cepm-nate Oct 14, 2016
dbb7c8f
Case the Activity gets killed by the OS while it's in the background
jariztia Oct 18, 2016
73cb5b0
Import bundle for onRestoreStateForActivityResult method
jariztia Oct 19, 2016
56964e5
Merge pull request #1 from jariztia/master
arturokunder Oct 20, 2016
7f4e4da
Merge pull request #338 from jlowe234/master
EddyVerbruggen Oct 21, 2016
94c7e37
Merged remote 6.0.2 version
EddyVerbruggen Oct 21, 2016
f183aa5
Merged remote 6.0.2 version
EddyVerbruggen Oct 21, 2016
356ba6e
bump to 6.0.3
EddyVerbruggen Oct 21, 2016
622ac29
bump to 6.0.3
EddyVerbruggen Oct 21, 2016
ead42fb
bump to 6.0.3
EddyVerbruggen Oct 21, 2016
4c04689
Use explicit intent to launch scan activity
vladimir-kotikov Nov 7, 2016
75cffc3
Merge pull request #358 from vladimir-kotikov/explicit_intent
macdonst Nov 8, 2016
68b6fd1
Adds promise scan .done particularly to handle "No cameras" error (#363)
Nov 17, 2016
d43964f
Catch Class not registered exception in case of missing Media Player/…
Nov 16, 2016
1574176
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen Dec 3, 2016
1cdbf87
Merge pull request #346 from kunder-lab/master
EddyVerbruggen Dec 3, 2016
10f94bc
Merge pull request #334 from lucatorella/patch-1
EddyVerbruggen Dec 3, 2016
77622ca
Merge pull request #343 from cepm-nate/master
EddyVerbruggen Dec 3, 2016
a7ed689
Flashlight option #381
EddyVerbruggen Dec 3, 2016
f9960f9
Disable Animation #343
EddyVerbruggen Dec 3, 2016
05e62fa
Flashlight option #381
EddyVerbruggen Dec 3, 2016
87f50e9
Disable Animation #343
EddyVerbruggen Dec 3, 2016
6e3718c
Crash on iOS on low memory devices #304
EddyVerbruggen Dec 3, 2016
52a23b0
Focus improvements #186
EddyVerbruggen Dec 3, 2016
cdab613
bump
EddyVerbruggen Dec 4, 2016
9681fa2
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen Dec 4, 2016
b85a494
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen Dec 4, 2016
72ae2c7
Flipping orientation on Android crashes app #383
EddyVerbruggen Dec 7, 2016
b0d3e77
Fix barcodescanner-release-2.1.0.aar reference in config.xml
Dec 8, 2016
fee66a7
Flashlight default value #385
EddyVerbruggen Dec 22, 2016
93fd610
bump
EddyVerbruggen Dec 22, 2016
bd5e144
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen Dec 22, 2016
39e02d7
Merge remote-tracking branch 'origin/master'
EddyVerbruggen Dec 22, 2016
87fd19b
Merge remote-tracking branch 'upstream/master'
EddyVerbruggen Dec 22, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is for unifying the coding style of different editors and IDEs.
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
indent_size = 2

72 changes: 72 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing

We love pull requests from everyone.

[Fork](https://help.github.com/articles/fork-a-repo/), then [clone](https://help.github.com/articles/cloning-a-repository/) the repo:

```
git clone git@github.com:your-username/phonegap-plugin-barcodescanner.git
```

Set up a branch for your feature or bugfix with a link to the original repo:

```
git checkout -b my-awesome-new-feature
git push --set-upstream origin my-awesome-new-feature
git remote add upstream https://github.com/phonegap/phonegap-plugin-barcodescanner.git
```

Set up the project:

```
npm install
```

Make sure the tests pass before changing anything:

```
npm test
```

Make your change. Add tests for your change. Make the tests pass:

```
npm test
```

Commit changes:

```
git commit -m "Cool stuff"
```

Make sure your branch is up to date with the original repo:

```
git fetch upstream
git merge upstream/master
```

Review your changes and any possible conflicts and push to your fork:

```
git push origin
```

[Submit a pull request](https://help.github.com/articles/creating-a-pull-request/).

At this point you're waiting on us. We do our best to keep on top of all the pull requests. We may suggest some changes, improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

- Write tests.
- Write a [good commit message](http://chris.beams.io/posts/git-commit/).
- Make sure the PR merges cleanly with the latest master.
- Describe your feature/bugfix and why it's needed/important in the pull request description.


## Editor Config

The project uses [.editorconfig](http://editorconfig.org/) to define the coding
style of each file. We recommend that you install the Editor Config extension
for your preferred IDE. Consistency is key.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Expected Behaviour

### Actual Behaviour

### Reproduce Scenario (including but not limited to)

#### Steps to Reproduce

#### Platform and Version (eg. Android 5.0 or iOS 9.2.1)

#### (Android) What device vendor (e.g. Samsung, HTC, Sony...)

#### Cordova CLI version and cordova platform version

cordova --version
cordova platforms

#### Plugin version

cordova plugin version | grep phonegap-plugin-barcodescanner

#### Sample Code that illustrates the problem

#### Logs taken while reproducing problem
Empty file.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
bin/
.classpath
.project
.idea
*.iml
local.properties
src/windows/lib/.vs
src/windows/lib/bin
src/windows/lib/obj
node_modules
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ git:
node_js:
- "0.10"
install:
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- cd ..
- npm install -g cordova-paramedic
- npm install -g cordova
- npm install -g ios-sim
script:
- cordova-paramedic --platform ios --plugin ${TRAVIS_BUILD_DIR}
- cordova-paramedic --platform ios --plugin ${TRAVIS_BUILD_DIR}
380 changes: 380 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

63 changes: 49 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@

[![Build Status](https://travis-ci.org/phonegap/phonegap-plugin-barcodescanner.svg)](https://travis-ci.org/phonegap/phonegap-plugin-barcodescanner)

**Note: This repository is no longer maintained. The official repository is now at [phonegap/phonegap-plugin-barcodescanner](http://github.com/phonegap/phonegap-plugin-barcodescanner).**

Cross-platform BarcodeScanner for Cordova / PhoneGap.

Follows the [Cordova Plugin spec](http://cordova.apache.org/docs/en/5.0.0/plugin_ref_spec.md), so that it works with [Plugman](https://github.com/apache/cordova-plugman).
Follows the [Cordova Plugin spec](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html), so that it works with [Plugman](https://github.com/apache/cordova-plugman).

## Installation


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

phonegap plugin add phonegap-plugin-barcodescanner
Expand All @@ -28,7 +26,7 @@ It is also possible to install via repo url directly ( unstable )

- Android
- iOS
- Windows 8
- Windows (Windows/Windows Phone 8.1 and Windows 10)
- Windows Phone 8
- BlackBerry 10
- Browser
Expand All @@ -38,8 +36,28 @@ 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"
```

### PhoneGap Build
If you're using [PhoneGap Build](https://build.phonegap.com/) 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/plugin/BarcodeScanner` with the method `scan(success, fail)`.
The plugin creates the object `cordova/plugin/BarcodeScanner` with the method `scan(success, fail)`.

The following barcode types are currently supported:
### Android
Expand All @@ -56,9 +74,12 @@ The following barcode types are currently supported:
* CODABAR
* ITF
* RSS14
* PDF417
* RSS_EXPANDED

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

### iOS

* QR_CODE
Expand All @@ -71,7 +92,7 @@ The following barcode types are currently supported:
* CODE_39
* ITF

### Windows8
### Windows

* UPC_A
* UPC_E
Expand Down Expand Up @@ -121,23 +142,34 @@ The following barcode types are currently supported:
`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:
```
```js
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
}
);
```

## Encoding a Barcode ##

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

Supported encoding types:

Expand All @@ -157,8 +189,11 @@ A full example could be:
);
```

## Windows8 quirks ##
Windows 8 implementation currently doesn't support encode functionality.
## 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.
Expand All @@ -169,7 +204,7 @@ Cancelling a scan on BlackBerry 10 is done by touching the screen.

## Thanks on Github ##

So many -- check out the original [iOS](https://github.com/phonegap/phonegap-plugins/tree/DEPRECATED/iOS/BarcodeScanner), [Android](https://github.com/phonegap/phonegap-plugins/tree/DEPRECATED/Android/BarcodeScanner) and
So many -- check out the original [iOS](https://github.com/phonegap/phonegap-plugins/tree/DEPRECATED/iOS/BarcodeScanner), [Android](https://github.com/phonegap/phonegap-plugins/tree/DEPRECATED/Android/BarcodeScanner) and
[BlackBerry 10](https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/BarcodeScanner) repos.

## Licence ##
Expand Down
52 changes: 52 additions & 0 deletions hooks/windows/check-arch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
module.exports = function(ctx) {
if (ctx.opts && ctx.opts.platforms && ctx.opts.platforms.indexOf('windows') > -1
&& ctx.opts.options) {
var path = require('path');
var shell = ctx.requireCordovaModule('shelljs');
var nopt = ctx.requireCordovaModule('nopt');

// parse and validate args
var args = nopt({
'archs': [String],
'appx': String,
'phone': Boolean,
'win': Boolean,
'bundle': Boolean,
'packageCertificateKeyFile': String,
'packageThumbprint': String,
'publisherId': String,
'buildConfig': String
}, {}, ctx.opts.options.argv, 0);

// Check if --appx flag is passed so that we have a project build version override:
var isWin10 = args.appx && args.appx.toLowerCase() === 'uap';

// Else check "windows-target-version" preference:
if (!isWin10) {
var configXml = shell.ls(path.join(ctx.opts.projectRoot, 'config.xml'))[0];

var reTargetVersion = /<preference\s+name="windows-target-version"\s+value="(.+)"\s*\/>/i;
var targetVersion = shell.grep(reTargetVersion, configXml);

var result = reTargetVersion.exec(targetVersion);
if (result !== null) {
var match = result[1];
isWin10 = parseInt(match.split('.'), 10) > 8;
}
}

// Non-AnyCPU arch is required for Windows 10 (UWP) projects only:
if (isWin10) {
var rawArchs = ctx.opts.options.archs || args.archs;
var archs = rawArchs ? rawArchs.split(' ') : [];

// Avoid "anycpu" arch:
if (archs.length === 0 || archs.some(function (item) {
return item.toLowerCase() === 'anycpu';
})) {
throw new Error('You must specify an architecture to include the proper ZXing library version.'
+ '\nUse \'cordova run windows -- --arch="x64"\' or \'cordova run windows -- --arch="arm" --phone --device\' for example.');
}
}
}
}
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "phonegap-plugin-barcodescanner",
"version": "4.0.1",
"version": "6.0.5",
"description": "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.",
"cordova": {
"id": "phonegap-plugin-barcodescanner",
"platforms": [
"ios",
"android",
"windows8",
"windows",
"wp8",
"blackberry10",
Expand All @@ -23,11 +22,11 @@
"ecosystem:phonegap",
"cordova-ios",
"cordova-android",
"cordova-windows8",
"cordova-windows",
"cordova-wp8",
"cordova-blackberry10",
"cordova-browser"
"cordova-browser",
"cordova:plugin"
],
"engines": [
{
Expand All @@ -40,5 +39,12 @@
"bugs": {
"url": "https://github.com/phonegap/phonegap-plugin-barcodescanner/issues"
},
"homepage": "https://github.com/phonegap/phonegap-plugin-barcodescanner#readme"
"homepage": "https://github.com/phonegap/phonegap-plugin-barcodescanner#readme",
"scripts": {
"test": "jasmine-node --color spec"
},
"devDependencies": {
"jasmine-node": "1.14.5",
"pluginpub": "^0.0.5"
}
}
Loading