Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Documented new features
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Aug 31, 2014
1 parent 5f37fb1 commit 8b9d6a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ 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.

On iOS and Android you can pass in options to (ignored on WP8):
* `preferFrontCamera` default false: prefer starting the scanner with the front camera (if multiple cameras are available).
* `showFlipCameraButton` default false: show a button on the scan UI to toggle the back/front camera (if multiple cameras are available).


A full example could be:
```
cordova.plugins.barcodeScanner.scan(
Expand All @@ -61,6 +66,10 @@ A full example could be:
},
function (error) {
alert("Scanning failed: " + error);
},
{
"preferFrontCamera" : true,
"showFlipCameraButton" : true
}
);
```
Expand Down

0 comments on commit 8b9d6a5

Please sign in to comment.