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

Commit

Permalink
Merge branch 'master' into barcodeEncodeBB
Browse files Browse the repository at this point in the history
Conflicts:
	www/blackberry10/client.js
  • Loading branch information
timwindsor committed Dec 15, 2015
2 parents 2219f19 + 6b5f7fb commit d9f4795
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 148 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phonegap-plugin-barcodescanner",
"version": "4.0.0",
"version": "4.1.0",
"description": "You can use the BarcodeScanner plugin to scan different types of barcodes (using the device's camera) and get the metadata encoded in them for processing within your application.",
"cordova": {
"id": "phonegap-plugin-barcodescanner",
Expand Down
3 changes: 2 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:rim="http://www.blackberry.com/ns/widgets"
id="phonegap-plugin-barcodescanner"
version="3.1.2">
version="4.1.0">

<name>BarcodeScanner</name>
<description>You can use the BarcodeScanner plugin to scan different types of barcodes (using the device's camera) and get the metadata encoded in them for processing within your application.</description>
Expand Down
5 changes: 3 additions & 2 deletions src/blackberry10/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
if (handle !== null) {
var values = { group: group, handle: handle };
barcodescanner.getInstance().startRead(result.callbackId, values);
// result.noResult(true); // calls the error handler for some reason
result.noResult(true);
} else {
result.error("Failed to find window handle", false);
}
Expand Down Expand Up @@ -165,7 +165,8 @@ JNEXT.BarcodeScanner = function () {

if (receivedEvent == "community.barcodescanner.codefound.native") {
if (result) {
result.callbackOk(data, false);
var parsed = JSON.parse(data);
result.callbackOk(parsed, false);
}
this.stopRead(callbackId);

Expand Down
6 changes: 3 additions & 3 deletions src/ios/CDVBarcodeScanner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ - (NSString*)setUpCaptureSession {

[output setSampleBufferDelegate:self queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0)];

if (![captureSession canSetSessionPreset:AVCaptureSessionPresetMedium]) {
return @"unable to preset medium quality video capture";
if (![captureSession canSetSessionPreset:AVCaptureSessionPresetHigh]) {
return @"unable to preset high quality video capture";
}

captureSession.sessionPreset = AVCaptureSessionPresetMedium;
captureSession.sessionPreset = AVCaptureSessionPresetHigh;

if ([captureSession canAddInput:input]) {
[captureSession addInput:input];
Expand Down
141 changes: 0 additions & 141 deletions www/blackberry10/client.js

This file was deleted.

0 comments on commit d9f4795

Please sign in to comment.