nativescript-barcodescanner
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -152,6 +152,5 @@ "use strict"; | ||
if (intent.resolveActivity(com.tns.NativeScriptApplication.getInstance().getPackageManager()) !== null) { | ||
var previousResult_1 = appModule.android.onActivityResult; | ||
appModule.android.onActivityResult = function (requestCode, resultCode, data) { | ||
appModule.android.onActivityResult = previousResult_1; | ||
if (requestCode === SCANNER_REQUEST_CODE) { | ||
appModule.android.on('activityResult', function (data) { | ||
if (data.requestCode === SCANNER_REQUEST_CODE) { | ||
self.onPermissionGranted = null; | ||
if (isContinuous) { | ||
@@ -164,5 +163,5 @@ if (_onScanReceivedCallback) { | ||
else { | ||
if (resultCode === android.app.Activity.RESULT_OK) { | ||
var format = data.getStringExtra(com.google.zxing.client.android.Intents.Scan.RESULT_FORMAT); | ||
var text = data.getStringExtra(com.google.zxing.client.android.Intents.Scan.RESULT); | ||
if (data.resultCode === android.app.Activity.RESULT_OK) { | ||
var format = data.intent.getStringExtra(com.google.zxing.client.android.Intents.Scan.RESULT_FORMAT); | ||
var text = data.intent.getStringExtra(com.google.zxing.client.android.Intents.Scan.RESULT); | ||
resolve({ | ||
@@ -178,3 +177,3 @@ format: format, | ||
} | ||
}; | ||
}); | ||
appModule.android.foregroundActivity.startActivityForResult(intent, SCANNER_REQUEST_CODE); | ||
@@ -181,0 +180,0 @@ if (isContinuous) { |
# Change Log | ||
## [2.5.1](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/2.5.1) (2017-05-11) | ||
[Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/15?closed=1) | ||
**Fixed bugs:** | ||
- Promise not returned on android device with NS 3.0 [\#84](https://github.com/EddyVerbruggen/nativescript-barcodescanner/issues/84) | ||
- Use onActivityResult event handler rather than callback method #85 [\#85](https://github.com/EddyVerbruggen/nativescript-barcodescanner/issues/85) | ||
- Resolved bug where the scanner was opening after any permission was a.. [\#86](https://github.com/EddyVerbruggen/nativescript-barcodescanner/issues/86) | ||
## [2.5.0](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/2.5.0) (2017-04-12) | ||
@@ -4,0 +14,0 @@ [Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/compare/2.4.2...2.5.0) |
{ | ||
"name": "nativescript-barcodescanner", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Scan QR/barcodes with a {N} app.", | ||
@@ -5,0 +5,0 @@ "main": "barcodescanner", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1678159
29
615