Has anyone used both MeteorCamera and cordova.plugins.barcodeScanner
without getting errors?
The error is:
=> App running at: http://localhost:3000/
I20150915-21:43:07.712(-7) (android:null:1) exception firing pause event from native
I20150915-21:43:16.018(-7) (android:cordova.js:1169) deviceready has not fired after 5 seconds.
I20150915-21:43:16.019(-7) (android:cordova.js:1162) Channel not fired: onPluginsReady
I20150915-21:43:16.022(-7) (android:cordova.js:1162) Channel not fired: onCordovaReady
I20150915-21:43:44.752(-7) (android:http://meteor.local/cordova.js:1169) deviceready has not fired after 5 seconds.
I20150915-21:43:44.753(-7) (android:http://meteor.local/cordova.js:1162) Channel not fired: onPluginsReady
I20150915-21:43:44.754(-7) (android:http://meteor.local/cordova.js:1162) Channel not fired: onCordovaReady
Could you try this with Meteor 1.2 RC (meteor update --release 1.2-rc.15)? Among other things, this comes with a newer Cordova version that knows how to download plugins from npm instead of from the now deprecated Cordova plugin registry.
That should allow you to use the latest version of the phonegap-plugin-barcodescanner plugin (note the plugin ID change), which seems to be 4.0.2.
While running Cordova app for platform Android with options --device:
Error: Command failed: /Users/lorna/meteor/testapp/.meteor/local/cordova-build/platforms/android/cordova/run
–device
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
warning: string ‘menu_settings’ has no default translation.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/lorna/meteor/testapp/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: pkg:
/data/local/tmp/android-debug.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
I removed the old app. The new version runs without the channel error message, but the barcode scanner does not work after the scan. The last message I see in the scanner is “found product”, but the data is not returned like it was before. I should see the alert().
Template.scanBarcode.events({
‘click button’: function () {
cordova.plugins.barcodeScanner.scan(
function (result) {
alert(“We got a barcode\n” +
"Result: " + result.text + “\n” +
"Format: " + result.format + “\n” +
"Cancelled: " + result.cancelled);
if (!result.cancelled) {
Session.set(“barcode”, result.text);
}
},
function (error) {
alert("Scanning failed: " + error);
}
The barcode scanner does not work (return the barcode) with 1.2RC and 4.0.2 of the plugin. It doesn’t produce an error, just never returns the barcode.