Skip to content

Commit 7f2da15

Browse files
authored
Adds more information on readme
1 parent b32e4af commit 7f2da15

File tree

1 file changed

+24
-4
lines changed
  • src/pages/miscellaneous/barcodescanner

1 file changed

+24
-4
lines changed
Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
$ sudo ionic plugin add phonegap-plugin-barcodescanner
2-
$ sudo ionic plugin add cordova-plugin-crosswalk-webview
1+
# Barcode Scanner
2+
You can check more info on the docs: https://github.com/phonegap/phonegap-plugin-barcodescanner
33

4-
$ sudo ionic build android
5-
$ adb install -r platforms/android/build/outputs/apk/android-armv7-debug.apk
4+
In order to use this feature, you have to install the plugin:
5+
```sh
6+
$ ionic plugin add phonegap-plugin-barcodescanner --save --variable CAMERA_USAGE_DESCRIPTION="To scan barcodes"
7+
```
8+
9+
Important note: Since iOS 10 it's mandatory to add a `NSCameraUsageDescription` in the info.plist.
10+
11+
`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.
12+
13+
This entry is passed on the `--variable` flag on plugin install.
14+
15+
16+
In case you want to support low end/old devices, make sure to install crosswalk:
17+
```sh
18+
$ ionic plugin add cordova-plugin-crosswalk-webview
19+
```
20+
21+
You can either try it out on a device or try it using an emulator:
22+
```sh
23+
$ ionic build android
24+
$ adb install -r platforms/android/build/outputs/apk/android-armv7-debug.apk
25+
```

0 commit comments

Comments
 (0)