-
Notifications
You must be signed in to change notification settings - Fork 732
Open
Description
Hello. Sorry for my English )
I added the plugin BarcodeScanner in my Phonegap-application.
- Added to config.xml:
<plugin name="com.phonegap.plugins.barcodescanner" spec="2.0.0" source="pgb" />
and
<preference name="android-build-tool" value="gradle" /> - In the javascript:
cordova.plugins.barcodeScanner.scan(
function (result) {
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function (error) {
alert("Scanning failed: " + error);
}
);
- The finished application I created through the site build.phonegap.com
Should I do anything else?
The scanner is triggered and even scans, that's just not give any value.
When I press the Cancel button on the scanner, the application falls (closed).
System log on the iPhone 5 contains the following entries after the scan:
Oct 11 20:18:49 iPhone MyApp[4669] <Warning>: WARNING: -[<AVCaptureVideoPreviewLayer: 0x15de5610> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported
Oct 11 20:18:49 iPhone MyApp[4669] <Warning>: WARNING: -[<AVCaptureVideoPreviewLayer: 0x15de5610> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation:
Oct 11 20:18:49 iPhone MyApp[4669] <Warning>: WARNING: -[<AVCaptureVideoPreviewLayer: 0x15de5610> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation:
Oct 11 20:18:58 iPhone kernel[0] <Notice>: AppleH4CamIn::ISP_FlushInactiveDARTMappings: 0x00000000
Oct 11 20:18:58 iPhone MyApp[4669] <Error>: -[CDVPluginResult toSuccessCallbackString:]: unrecognized selector sent to instance 0x15d28ad0
Please tell me what is wrong?
Do I have to include the file: <script type = "text/javascript" src = "barcodescanner.js"></ script> in my index.html?
Metadata
Metadata
Assignees
Labels
No labels