Thank you!
Hi Lerg
Can I choose whether to use the cam frontal or back cam?
Thanks
No, it’s automatic. And there is no reliable way to see what camera is front on Android. Some devices mess it up.
Thanks for your reply Lerg, I need to scan a QR code through the front camera in order the make them login into a system. From my understanding of Rob Miracle message the software use the front camera only when it’s the only available(eg. Nexus 7).
Have ever tested it on other tablet having the only front camera?
It should work fine on most tablets that have only front facing camera.
Thanks for the quick reply. If my project is done I’ll build a tablet adhoc for my App, I think it’s important to have at least 4 megapixels and autofocus. Your plugin is great. Will donate to you Thank you Lerg
Sergey, I just got this plugin yesterday, and I’m on Corona Daily Build 2756. First off, excellent plugin!
But I’m still seeing the orientation problem that Rob Miracle mentioned above. My app operates in landscape mode exclusively, and if i happen to turn the device, then start the QR scanner, it will be oriented so that it’s half way off the screen.
Can you put in some way to allow it to be locked to a certain orientation? If it could automatically detect based on the build.settings, that would be even better, but I would not mind if I could just pass in another parameter to it like so:
options.orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft" } } }
Thanks, and great work!
Dave
It should be locked, at least it’s intended to. Can you tell me extra info - device, OS, versions and so on.
iPhone 6. iOS 9.1
So it ends up looking like this on my iPhone 6, running iOS 9.1:
Corona Daily Build 2756.
Steps to reproduce:
-
App runs only in landscape mode, but turn the device into Portrait mode anyway
-
Start the QR Scanner
-
It will be *locked*, but in *Portrait* orientation instead of Landscape.
-
If I cancel, turn the phone back to Landscape orientation, start it up again, all is well.
So in a way, yes, it does stay locked, but it depends on which orientation it was in at the time of starting it, regardless of whether the app supports that or not. (I hope that makes sense.)
Thanks,
Dave
Sergey, I’m happy to donate if you can fix this one little issue. I know you can because you rock.
Dave
Hi,
I have the same bug as dave about the plugin. I made movie to explain the problem.
My app is in portrait mode in the build.settings
Link movie : https://www.youtube.com/watch?v=vf-0XbsyMO0
benjamin.goutfer, thanks for creating the video. That’s it exactly.
Hello,
I ordered this plugin from the Corona store and they have activated it. However, I do not see a link to download the corresponding Lua file.
The documentation states to download the file and use it. Where do I download the plugin from?
I just started working with Corona so my apologies if this is a newbie question.
Thanks.
There is nothing to download for SDK users. If you were using Corona Enterprise, you would have to download something. You just need to add some code to build.settings and add some code to the module where you want use the QR code.
Rob
Quick a note. When the user clicks back in the qr-code-scanner, it will bring back to the previous page and call ‘composer show’ again. Of course there is the system event (suspend and resume) as mentioned in the previous post.
I did a track of the whether the user scanned anything. Something like that :
local g\_scanStatus = 1 -- 1 = New, 2 = Scanned, 3 = Scan in progress local function qrScannerListener( dataString ) -- Update the status g\_scanStatus = 2 end local function loadQRScanner() -- Start QR scanner local qrOptions = {} qrOptions.strings = { title = 'Scan QR Code', } g\_qrscanner.show( qrScannerListener, qrOptions ) g\_scanStatus = 3 end function scene:create( event ) -- Update the status g\_scanStatus = 1 end function scene:show( event ) local group = self.view if ( event.phase == "will" ) then elseif ( event.phase == "did" ) then if g\_scanStatus == 3 then -- User tried to scan something, but clicked 'back' button. -- Set back the status so it doesn't loop. g\_scanStatus = 1 -- Put your go-back code or something else here. end end end
Hi Dave, Benjamin. Finally found time to fix it. Now it’s fixed.
Thank you, Lerg. It’s a great plugin, but I still don’t feel comfortable with using any unofficial plugin in an app, though, for the reasons outlined here:
https://forums.coronalabs.com/topic/60169-specific-versions-of-corona-store-plugins/
I hoped that by the time you fixed it, Corona would have changed the plugin policy.
Not that anyone in the Corona community would do this (everyone here is generally nice and helpful, at least in my experience), but the way this is now could enable a nefarious developer to do this:
Take down a popular plugin.
Force app developers who integrated it to pay a ransom in order to update their apps.
Put the plugin back in the store.
Every so often, repeat.
I don’t consider you a nefarious developer, just so you know. It’s just that the Corona policy that enables a plugin developer to remove the plugin after people have already integrated it into their apps is not cool and adds too much risk to a commercial app. When I “purchase” the plugin, I should have access to it forever on my account. Ideally, I’d also be able to specify which version of it I want in case a later version of the plugin introduces something I don’t want.
I want to integrate the QR scanner, but when I do, the marketing team will end up putting QR codes on everything with instructions to download our app, and then if the plugin were to ever disappear (for any reason) – my team would look pretty bad the next time we need to update the app…
Dave
Dave,
I understand your concern, but you have nothing to worry about. Why would I remove a plugin in the first place? There are no reasons at all.
And if it makes you more comfortable, now I am working for Corona Labs, however these plugins are still “not official”, but that doesn’t mean that I will stop supporting them at some point.
So please use my plugins and don’t worry.