Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

QR Scanner
Started by Michael W. Aug 12 2015 01:53 PM

343 replies to this topic
release android ios
[TOPIC CONTROLS]
Page 1 of 14 1 2 3 »
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

QR Scanner

by Spiral Code Studio


View and activate on the Corona Store

 
QR code or barcode scanning and reading plugin, available for iOS and Android.
 
Documentation
  • raymondcheng and MrNeo like this

[TOPIC: post.html]
#2

elpita01

[GLOBAL: userInfoPane.html]
elpita01
  • Enthusiast

  • 82 posts
  • Corona SDK

This is great!


  • cturans likes this

[TOPIC: post.html]
#3

MrNeo

[GLOBAL: userInfoPane.html]
MrNeo
  • Observer

  • 12 posts
  • Corona SDK

It's work on iOS but my android Oppo and Samsung  DUO not work, Android crash when call qr scanner.



[TOPIC: post.html]
#4

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

It's work on iOS but my android Oppo and Samsung  DUO not work, Android crash when call qr scanner.

Great! Now we only need to find the bug and fix it. Please send me over your "adb logcat" logs from both devices.



[TOPIC: post.html]
#5

MrNeo

[GLOBAL: userInfoPane.html]
MrNeo
  • Observer

  • 12 posts
  • Corona SDK

This is dropbox link for android log

https://www.dropbox.com/s/et50z2b9qqnivx3/QR%20Scaner%20Android%20Log.zip?dl=0



[TOPIC: post.html]
#6

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

The error is about not being able to load a library "iconv", which is used internally inside the scanner.
What are exact models of your phones?
And what Android version?



[TOPIC: post.html]
#7

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

I think I've fixed the issue and updated the plugin. It takes about an hour for the changes to take effect on Corona's servers.
Please try in an hour and see if the issue is resolved.



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 22,493 posts
  • Corona Staff

Hey Lerg!  This is pretty cool.  Couple of things to report.

 

On my Google Nexus 7 (which only has a front camera), it crashes with this error:

 

V/Corona  ( 6176): > Class.forName: plugin.qrscanner.LuaLoader
V/Corona  ( 6176): < Class.forName: plugin.qrscanner.LuaLoader
V/Corona  ( 6176): Loading via reflection: plugin.qrscanner.LuaLoader
I/Corona  ( 6176): Runtime error
I/Corona  ( 6176): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
I/Corona  ( 6176): Java Stack Trace:
I/Corona  ( 6176):     android.os.Handler.<init>(Handler.java:200)
I/Corona  ( 6176):     android.os.Handler.<init>(Handler.java:114)
I/Corona  ( 6176):     android.widget.Toast$TN.<init>(Toast.java:344)
I/Corona  ( 6176):     android.widget.Toast.<init>(Toast.java:100)
I/Corona  ( 6176):     android.widget.Toast.makeText(Toast.java:258)
I/Corona  ( 6176):     plugin.qrscanner.LuaLoader.show(LuaLoader.java:207)
I/Corona  ( 6176):     plugin.qrscanner.LuaLoader$ShowWrapper.invoke(LuaLoader.java:239)
I/Corona  ( 6176):     com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
I/Corona  ( 6176):     com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:372)
I/Corona  ( 6176):     com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:374)
I/Corona  ( 6176):     com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1611)
I/Corona  ( 6176):     com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)
I/Corona  ( 6176): stack traceback:
I/Corona  ( 6176):     [C]: in function 'show'
I/Corona  ( 6176):     ?: in main chunk
 

The app is also a landscape app if that matters.

 

On iOS on my iPhone6 , the landscape only app causes the scanning window to orient partially off screen.  In Portrait mode it works like a charm!

 

Rob



[TOPIC: post.html]
#9

MrNeo

[GLOBAL: userInfoPane.html]
MrNeo
  • Observer

  • 12 posts
  • Corona SDK

My oppo model R2001 Android 4.2.2 and Samsung model GalaxyA7 SM-A700FD android 4.4.4

for new plugin update I can open scanner and see front camera, but when move to QR and lock it still crash.

This is log https://www.dropbox.com/s/muo4t0mu322q0gq/QR%20Log%202.zip?dl=0



[TOPIC: post.html]
#10

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

Thank you for reports! Will fix it.



[TOPIC: post.html]
#11

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

Rob, I have only an iPad and I tried in the iOS Simulator from Xcode and it works fine in landscape mode, except that in the simulator I don't see the camera, because it is absent.
Can you please make a screenshot of what's happening?



[TOPIC: post.html]
#12

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

Rob, I just committed a fixed version of the plugin for Android. Now front camera should work.



[TOPIC: post.html]
#13

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

mongkon6, I am not sure what exactly causes your issue, but I've just made a fix based on my gut feeling. Please try when the plugin gets updated.



[TOPIC: post.html]
#14

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 629 posts
  • Corona SDK

That's great news! I can't wait to get my hands on that.



[TOPIC: post.html]
#15

anil8

[GLOBAL: userInfoPane.html]
anil8
  • Contributor

  • 124 posts
  • Corona SDK

Sergey,

 

 

I must congratulate and thank you for the excellent QR Scanner plugin - it was exactly what I was looking for and will be using it in my next app.

 

Do you have any plans of incorporating a Barcode/QR Generator as well as the reader as this too would be extremely useful.

 

Thanks.



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 22,493 posts
  • Corona Staff

It noticed today it appears to ignore the camera's orientation. If I hold it landscape while being a landscape app, its fine. But if I rotate to portrait (even though the app is landscape only), the camera rotates around 0, 0 and stays landscape but now the device is portrait.

 

Rob

Attached Files



[TOPIC: post.html]
#17

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

Rob, thanks! That helped. I've just pushed a fix for that.



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 22,493 posts
  • Corona Staff

Woo Hoo!



[TOPIC: post.html]
#19

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

Sergey,

 

 

I must congratulate and thank you for the excellent QR Scanner plugin - it was exactly what I was looking for and will be using it in my next app.

 

Do you have any plans of incorporating a Barcode/QR Generator as well as the reader as this too would be extremely useful.

 

Thanks.

 

Thank you! Barcode / QR Generator would be a different plugin. I doubt many people will use it. If you really need it, you can hire me to make it.



[TOPIC: post.html]
#20

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 22,493 posts
  • Corona Staff

Or you could use network.download() to an API service that generates them such as:  or use a webView if  you just want to display it.  There are probably similar services to generate bar codes.

 

Rob



[TOPIC: post.html]
#21

MrNeo

[GLOBAL: userInfoPane.html]
MrNeo
  • Observer

  • 12 posts
  • Corona SDK

mongkon6, I am not sure what exactly causes your issue, but I've just made a fix based on my gut feeling. Please try when the plugin gets updated.

 

I have try it , But it's still crash.



[TOPIC: post.html]
#22

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

I have try it , But it's still crash.

Can you please try different QR codes and different barcodes to see if the issue depends on it?



[TOPIC: post.html]
#23

anil8

[GLOBAL: userInfoPane.html]
anil8
  • Contributor

  • 124 posts
  • Corona SDK

@Lerg - with regards to the QR Code Generator, I thought you might want to offer both the Reader and the Writer in one simple plugin.

 

As Rob says, it is trivial to generate the QR Code just by using one of the many Restful api's out there - I am using the Google Charts API to create the QR Codes using network.download()

 

e.g.

 

network.download(

    "GET",
    networkListener,
    params,
    "myQRCode.png",
    system.TemporaryDirectory
)
 
Thanks for the Reader and keep up the great work.

  • dkla27 likes this

[TOPIC: post.html]
#24

MrNeo

[GLOBAL: userInfoPane.html]
MrNeo
  • Observer

  • 12 posts
  • Corona SDK

Can you please try different QR codes and different barcodes to see if the issue depends on it?

I try with another QR and Barcode it's still crash.



[TOPIC: post.html]
#25

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 513 posts
  • Corona Staff

 

@Lerg - with regards to the QR Code Generator, I thought you might want to offer both the Reader and the Writer in one simple plugin.

 

Generating requires different libs to be included, to much additional work. These libs will take disk space and many people won't need them, therefore they might increase end app size without any necessity.

 

Thanks for the network example.




[topic_controls]
Page 1 of 14 1 2 3 »
 
[/topic_controls]

Also tagged with one or more of these keywords: release, android, ios