Bar code and QR code reader in corona.

You can use Pic2Shop…

Here is what you would place in the build.settings under the iphone -> plist

 CFBundleURLTypes =  
 {  
 {  
 CFBundleURLName = "com.Example.yourapp",  
 CFBundleURLSchemes =  
 {  
 "yourapp",  
 }  
 }  
 }  

Change yourapp to something else.
Place this somewhere like on a button press.

 system.openURL( "pic2shop://scan?callback=yourapp%3A")  

Again, change yourapp to what ever you chose in the build.settings.

You will need this as well…

local function onSystemEvent( event )  
 if event.type == "applicationOpen" and event.url then  
 launchURL = event.url  
 print( launchURL )  
 local testA = string.find ( launchURL, "=" )  
  
 if tostring(testA) ~= "nil" then  
 barCodeFinal = string.sub ( launchURL, testA + 1 )  
 end  
 end  
end  

It isn’t an elegant solution, but it will give your app QR and barcode scan capabilities. [import]uid: 10280 topic_id: 36063 reply_id: 143284[/import]

I just asked about QR support on another thread this is a good compromise. Thanks for posting this. [import]uid: 148866 topic_id: 36063 reply_id: 143290[/import]

So is pic2shop built-in inside Corona? Or it’s using a web service to decode the URL and thus requires internet connection? [import]uid: 206803 topic_id: 36063 reply_id: 143298[/import]

Looks like its based on this: http://www.pic2shop.com/demo/scan.html [import]uid: 148866 topic_id: 36063 reply_id: 143304[/import]

thank’s a million minion.

Have been looking high and low for this function. [import]uid: 13125 topic_id: 36063 reply_id: 143308[/import]

Just for the record I tried minion multimedias code and it works perfectly. I agree it is not as ideal as having the functionality built into corona however it switches between apps pretty quickly and runs quite smoothly. Thanks for this minion multimedia, it certainly has got me out of the poop, just a shame url schemes dont run on android yet unfortunately. [import]uid: 148866 topic_id: 36063 reply_id: 143318[/import]

Glad to help you out @NoobChoobGame@djung7 your welcome! I posted a sample app @ http://developer.coronalabs.com/code/barcode-scanning-wpic2shop for all :)… If one is looking for product data, http://eandata.com/ is a goo start… their http callback is easy to integrate. Free registration and if you find that you go over their max requests/day I think it isn’t too expensive. [import]uid: 10280 topic_id: 36063 reply_id: 143346[/import]

Thanks man. Too bad it only works on iphone.
Curious though. Why is it that only iOS can use it for corona and not on Android? [import]uid: 189861 topic_id: 36063 reply_id: 143399[/import]

Thanks. [import]uid: 189861 topic_id: 36063 reply_id: 143280[/import]

You can use Pic2Shop…

Here is what you would place in the build.settings under the iphone -> plist

 CFBundleURLTypes =  
 {  
 {  
 CFBundleURLName = "com.Example.yourapp",  
 CFBundleURLSchemes =  
 {  
 "yourapp",  
 }  
 }  
 }  

Change yourapp to something else.
Place this somewhere like on a button press.

 system.openURL( "pic2shop://scan?callback=yourapp%3A")  

Again, change yourapp to what ever you chose in the build.settings.

You will need this as well…

local function onSystemEvent( event )  
 if event.type == "applicationOpen" and event.url then  
 launchURL = event.url  
 print( launchURL )  
 local testA = string.find ( launchURL, "=" )  
  
 if tostring(testA) ~= "nil" then  
 barCodeFinal = string.sub ( launchURL, testA + 1 )  
 end  
 end  
end  

It isn’t an elegant solution, but it will give your app QR and barcode scan capabilities. [import]uid: 10280 topic_id: 36063 reply_id: 143284[/import]

I just asked about QR support on another thread this is a good compromise. Thanks for posting this. [import]uid: 148866 topic_id: 36063 reply_id: 143290[/import]

So is pic2shop built-in inside Corona? Or it’s using a web service to decode the URL and thus requires internet connection? [import]uid: 206803 topic_id: 36063 reply_id: 143298[/import]

Looks like its based on this: http://www.pic2shop.com/demo/scan.html [import]uid: 148866 topic_id: 36063 reply_id: 143304[/import]

thank’s a million minion.

Have been looking high and low for this function. [import]uid: 13125 topic_id: 36063 reply_id: 143308[/import]

Just for the record I tried minion multimedias code and it works perfectly. I agree it is not as ideal as having the functionality built into corona however it switches between apps pretty quickly and runs quite smoothly. Thanks for this minion multimedia, it certainly has got me out of the poop, just a shame url schemes dont run on android yet unfortunately. [import]uid: 148866 topic_id: 36063 reply_id: 143318[/import]

Glad to help you out @NoobChoobGame@djung7 your welcome! I posted a sample app @ http://developer.coronalabs.com/code/barcode-scanning-wpic2shop for all :)… If one is looking for product data, http://eandata.com/ is a goo start… their http callback is easy to integrate. Free registration and if you find that you go over their max requests/day I think it isn’t too expensive. [import]uid: 10280 topic_id: 36063 reply_id: 143346[/import]

Thanks man. Too bad it only works on iphone.
Curious though. Why is it that only iOS can use it for corona and not on Android? [import]uid: 189861 topic_id: 36063 reply_id: 143399[/import]