Skip to content

Commit

Permalink
#44 Bulk scan callback is not updating after routing change
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Nov 1, 2016
1 parent 7d570c6 commit 75ce20c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion barcodescanner.android.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ScanOptions } from "./barcodescanner.common";
export declare class BarcodeScanner {
private broadcastManager;
private onContinuousScanResult;
private onPermissionGranted;
private onPermissionRejected;
private rememberedContext;
Expand Down
5 changes: 3 additions & 2 deletions barcodescanner.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var camera = require("camera");
var utils = require("utils/utils");
var SCANNER_REQUEST_CODE = 444;
var _onScanReceivedCallback = undefined;
var _onContinuousScanResult = undefined;
var BarcodeScanner = (function () {
function BarcodeScanner() {
this.broadcastManager = null;
Expand Down Expand Up @@ -116,7 +117,7 @@ var BarcodeScanner = (function () {
}
var isContinuous = typeof arg.continuousScanCallback === "function";
if (isContinuous) {
self.onContinuousScanResult = arg.continuousScanCallback;
_onContinuousScanResult = arg.continuousScanCallback;
intent.putExtra(com.google.zxing.client.android.Intents.Scan.BULK_SCAN, true);
var CallbackReceiver = android.content.BroadcastReceiver.extend({
onReceive: function (context, data) {
Expand All @@ -127,7 +128,7 @@ var BarcodeScanner = (function () {
}
if (arg.reportDuplicates || this.uniquelyScannedCodes.indexOf("[" + text + "][" + format + "]") === -1) {
this.uniquelyScannedCodes.push("[" + text + "][" + format + "]");
self.onContinuousScanResult({
_onContinuousScanResult({
format: format,
text: text
});
Expand Down
6 changes: 3 additions & 3 deletions barcodescanner.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ let SCANNER_REQUEST_CODE = 444;
declare let com, android: any;

let _onScanReceivedCallback = undefined;
let _onContinuousScanResult = undefined;

export class BarcodeScanner {

private broadcastManager: any = null;
private onContinuousScanResult: any;
private onPermissionGranted: Function;
private onPermissionRejected: Function;
private rememberedContext: any = null;
Expand Down Expand Up @@ -150,7 +150,7 @@ export class BarcodeScanner {
let isContinuous = typeof arg.continuousScanCallback === "function";
if (isContinuous) {

self.onContinuousScanResult = arg.continuousScanCallback;
_onContinuousScanResult = arg.continuousScanCallback;
intent.putExtra(com.google.zxing.client.android.Intents.Scan.BULK_SCAN, true);

let CallbackReceiver = android.content.BroadcastReceiver.extend({
Expand All @@ -164,7 +164,7 @@ export class BarcodeScanner {
}
if (arg.reportDuplicates || this.uniquelyScannedCodes.indexOf("[" + text + "][" + format + "]") === -1) {
this.uniquelyScannedCodes.push("[" + text + "][" + format + "]");
self.onContinuousScanResult({
_onContinuousScanResult({
format : format,
text : text
});
Expand Down

0 comments on commit 75ce20c

Please sign in to comment.