Skip to content

Commit

Permalink
Camera usage after calling barcodescanner.stop(); #221
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Sep 29, 2019
1 parent 89f876f commit 241c41c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ tns plugin add nativescript-barcodescanner
As you can see, you can style the view any way you like, and even overlay it with an image or button.
To recreate the layout above, look at [these lines in the demo app](https://github.com/EddyVerbruggen/nativescript-barcodescanner/blob/23395bec3e5a26622146daea96dd6407a8413f70/demo/app/main-page.xml#L17-L31).

> 💡 TIP: If you don't destroy the component/page which embed the scanner (but instead show a modal, or navigate "forward") you can "pause" the scanner (since plugin version 3.4.0). Simply set that `pause` property to `true` when applicable.
### XML
```xml
<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:Barcode="nativescript-barcodescanner">
Expand All @@ -94,7 +96,8 @@ Here's an example tag, showing all currently supported options. The property def
beepOnScan="true"
reportDuplicates="true"
preferFrontCamera="false"
scanResult="onScanResult" />
pause="{{ pause }}"
scanResult="{{ onScanResult }}" />
</iOS>
```

Expand All @@ -115,6 +118,7 @@ View:
beepOnScan="true"
reportDuplicates="true"
preferFrontCamera="false"
[pause]="pause"
(scanResult)="onScanResult($event)">
</BarcodeScanner>
```
Expand All @@ -138,6 +142,7 @@ View:
beepOnScan="true"
reportDuplicates="true"
preferFrontCamera="false"
:pause="pause"
@scanResult="onScanResult"
v-if="isIOS">
</BarcodeScanner>
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-barcodescanner",
"version": "3.3.2",
"version": "3.4.0",
"description": "Scan QR/barcodes with your NativeScript app.",
"main": "barcodescanner",
"typings": "index.d.ts",
Expand Down

0 comments on commit 241c41c

Please sign in to comment.