This is a NativeScript cross platform ZXing library for IOS and Android.
My code is (c)2016-2017, Master Technology. Everything is LICENSED under the APACHE 2.0 License, including libraries, meaning you are free to include this in any type of program -- However for entities that need a support contract, changes, enhancements and/or a commercial license please contact me at http://nativescript.tools.
I also do contract work; so if you have a module you want built or sponsored for NativeScript (or any other software projects) feel free to contact me firstname.lastname@example.org.
Same plugin works on both NativeScript 2.x and 3.x
tns plugin add nativescript-zxing in your ROOT directory of your project.
var ZXing = ;var zx = ;var img = zx;// Do something with the image
This creates a barcode image of 100x100 with the "Text" encoded into the QR Code barcode type. On iOS this will return a UImage which can be assigned to a NativeScript Image; on Android it will return a Bitmap which also can be assigned to a Image. (See Demo)
var ZXing = ;var zx = ;// Options are TOTALLY optionalvar options = tryHarder: true formats: ZXingQR_CODE ZXingITF;var results = zx;if !resultsconsole;elseconsole;console;
The source image for Android must be a bitmap; the source image for iOS must be a CGImage. (See Demo)
Please see the demo source https://github.com/NathanaelA/nativescript-zxing/tree/master/demo for how to read, write and convert between image formats. In addition when you SAVE on Android it might take a few minutes before the media indexer will actually see the new image to put it in the image picker.
ZXing supports the following Barcode types: