cordova --version
cordova platforms
cordova plugin version | grep phonegap-plugin-barcodescanner
I have this issue. Sorry my english I am spanish speaker. I run the app with ionic I and the next plugins config:
developer@developer:~/app/geo_tags$ sudo cordova platform
Installed platforms:
android 5.0.0
developer@developer:~/app/geo_tags$ sudo cordova plugin ls
cordova-plugin-camera 2.3.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.4 "Console"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-geolocation 2.4.0 "Geolocation"
cordova-plugin-splashscreen 4.0.0 "Splashscreen"
cordova-plugin-statusbar 2.2.0 "StatusBar"
cordova-plugin-whitelist 1.3.0 "Whitelist"
cordova.plugins.diagnostic 3.2.2 "Diagnostic"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 6.0.2 "BarcodeScanner"
But when the plugin read the QR code the App reload to init page config. I test on the device Moto G turbo 3 and Nexus 7 2013 same with android 6 version. Also in the debug with chrome inspect I dont received any error when the app reload the debug is closed and I dont show any message or error.
EDIT : Problem found for me: prompt option was undefined. (It may be not the same issue that the original one)
Same problem here. However, the crash occures only with the whitelist plugin! I need both :/
Stack trace :
11-18 22:47:20.488 27763 27809 E AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
11-18 22:47:20.488 27763 27809 E AndroidRuntime: Process: io.cordova.hellocordova, PID: 27763
11-18 22:47:20.488 27763 27809 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'int org.json.JSONArray.length()' on a null object reference
11-18 22:47:20.488 27763 27809 E AndroidRuntime: at com.phonegap.plugins.barcodescanner.BarcodeScanner$1.run(BarcodeScanner.java:157)
11-18 22:47:20.488 27763 27809 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
11-18 22:47:20.488 27763 27809 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
11-18 22:47:20.488 27763 27809 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
11-18 22:47:20.490 1834 5223 W ActivityManager: Force finishing activity io.cordova.hellocordova/.MainActivity
11-18 22:47:20.490 1834 5223 I ActivityManager: moveHomeStack, setupComplete:true
I have the same problem also me , looks that after scan android run an new activity and app reboot.
For anyone else having the same issue, the prompt option is mandatory for Android.
Omg, thanks, I was certain I have a problem with google libraries versions conflicting between different plugins, and I spent several hours trying to fix it 猸曪笍
this simple option did the trick!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This thread has been automatically locked.
Most helpful comment
For anyone else having the same issue, the
promptoption is mandatory for Android.