npm.io
0.0.2 • Published 8 years ago

cordova-cs-customscanner

Licence
ISC
Version
0.0.2
Deps
0
Size
617 kB
Vulns
0
Weekly
0

Cordova Custom Scanner Plugin

Simple plugin that scans QR code and Bar code with zoom and flash light.

Using

Create a new Cordova Project

$ cordova create hello com.example.helloapp Hello

Install the plugin

$ cd hello
$ cordova plugin add cordova-cs-customscanner

	customscan.scan(
		      function (result) {
		          
						if(!result.cancelled == true){
							alert("Scanning Success:" + result.text)
						}
		      },
		      function (error) {
		          alert("Scanning failed: " + error);
					
		      },{
				  "preferFrontCamera" : false, // iOS 
				  "showFlipCameraButton" : true, // iOS 
				  "showTorchButton" : true // iOS
			  }
		   );

Install iOS 

    cordova platform add ios
    
Run the code

    cordova run 

## More Info

Keywords