chris_griebel, the resources are package dependant. In Android Studio create a new library module with package id plugin.qrscanner and add resources there. I haven’t tried this procedure myself, but it should work.
Lerg,
Thank you for the response!
Our team has not yet transitioned to using android studio and are still using an ant build process. Moving everything over to use android studio at this time would be a last resort for us. Is there a way to do the same thing but with ant?
chris_griebel, moving to Android Studio doesn’t take much time. I highly recommend doing it.
Is this plugin still working? I can’t even go their website:
http://spiralcodestudio.com/plugin-qrscanner
I found another QR Scanner but it decode the QR from web. I prefer to do it on the device itself.
The plugin is working fine. The server is under maintenance, will be up in half a day. You can use the cached version.
Thanks for the quick response. I am new to this plugin. I can’t find any documentation to get started. Maybe I just wait until you website is live again.
Here is a link to a cached version:
http://webcache.googleusercontent.com/search?q=cache:dpPioWiYBXYJ:spiralcodestudio.com/plugin-qrscanner/
Thanks. Is it possible to change the color and the back button of the title bar? or even position and size?
Also, I didn’t set any overlay image but the QR code start to scan even the code is not within the default border.
Hi Lerg, I have not had much luck moving to Android Studio due to needing to update Corona Enterprise. Though I appear to have worked out most of the build issues, I have been unable to get my app working correctly. I have two threads at https://forums.coronalabs.com/topic/63755-issues-with-socket-library-after-updating-corona-enterprise/ and https://forums.coronalabs.com/topic/63673-latest-corona-enterprise-crashing/ for the problems I’m facing, but I haven’t gotten any replies yet. Would you maybe be able to take a look?
Hi Lerg, while it was quite a process for our project, I have now successfully switched to Android Studio and have started trying to use the qrscanner plugin in the new environment.
Following your advice, I tried to add a new module, named plugin with package name plugin.qrscanner and then used the plugin as described in the integration sample. I added the .jar files to android/plugin/libs and the resources to android/plugin/src/main/res. When building the project, I got the following error:
15:10:37.513 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 15:10:37.513 [ERROR] [org.gradle.BuildExceptionReporter] 15:10:37.513 [ERROR] [org.gradle.BuildExceptionReporter] \* What went wrong: 15:10:37.513 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':plugin:transformNative\_libsWithSyncJniLibsForRelease'. 15:10:37.513 [ERROR] [org.gradle.BuildExceptionReporter] \> java.io.FileNotFoundException: /Users/myUser/path/to/project/android/plugin/build/intermediates/bundles/release/jni/lib/armeabi-v7a/libiconv.so (No such file or directory)
To temporarily bypass the error, I manually copied the lib folder in iconv-zbar.jar directly to ‘/android/plugin/build/intermediates/bundles/release/jni/’ and that at least got me building. However, when running the app and trying to use the scanner, I got this other error:
W/dalvikvm: VFY: unable to resolve static field 7337 (qrscanner) in Lplugin/qrscanner/R$menu; W/dalvikvm: VFY: unable to resolve static field 7336 (action\_flash) in Lplugin/qrscanner/R$id; W/dalvikvm: VFY: unable to resolve static field 7336 (action\_flash) in Lplugin/qrscanner/R$id; W/dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lplugin/qrscanner/CameraActivity; W/dalvikvm: Class init failed in newInstance call (Lplugin/qrscanner/CameraActivity;) W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x413c2438) E/AndroidRuntime: FATAL EXCEPTION: main java.lang.ExceptionInInitializerError at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1319) at android.app.Instrumentation.newActivity(Instrumentation.java:1053) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1982) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092) at android.app.ActivityThread.access$600(ActivityThread.java:133) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4794) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.UnsatisfiedLinkError: Couldn't load iconv: findLibrary returned null at java.lang.Runtime.loadLibrary(Runtime.java:365) at java.lang.System.loadLibrary(System.java:535) at plugin.qrscanner.CameraActivity.\<clinit\>(CameraActivity.java:47) at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1319) at android.app.Instrumentation.newActivity(Instrumentation.java:1053) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1982) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092) at android.app.ActivityThread.access$600(ActivityThread.java:133) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4794) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at dalvik.system.NativeStart.main(Native Method)
Which seems like it is still having trouble with iconv and those /R$ make me wonder if it is finding the resources okay.
I would appreciate any assistance you can offer in getting this working :).
Hm, sorry, can’t look at the issue at the moment, too busy on the work. I thought it should have worked…
I think some device that use Intel processor (like ASUS zenpad 7.0 or ASUS zenpad c ) still crashes when I’m staring run the app . When I disable qrscaner plugin my app still running normally. This plugin not support ?
I think some device that use Intel processor (like ASUS zenpad 7.0 or ASUS zenpad c ) still crashes when I’m staring run the app . When I disable qrscaner plugin my app still running normally. This plugin not support ?
I cannot get the QR scanner to read barcodes anymore. QR codes seems to work great. When a QR code is recognized, the frame turns green.
But when I try to read barcodes nothing happen. The frame stays gray as if I had never pointed to any form of code.
Here’s a video of the behaviour:
https://www.youtube.com/watch?v=ALKKfzkktsU
Have I missed something. Had things been changed in the way the qr scanner must be used?
runewinse, yes, that has been changed a while ago. Scanning for everything by default sometimes causes false scans.
Now you have to specify what barcode types you want to scan for.
See options.symbols in qrscanner.show()
http://spiralcodestudio.com/plugin-qrscanner/
Thanks! It’s been so long since I worked on my project I have missed this.
One question though… If I add all symbols in the symbols list, will the scanner behave as before? Or is it illegal to mix ‘qr’ with the other symbols in the list?
You can add all of them, nobody would arrest you for that.
That is a relief!
But I’d also like to know if this makes the scanner work (more or less) like before the symbol list was introduced (with potentially false scans and all).