Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 123

DeckG
Aspiring developer
Profile
Posts: 36
Reg: Apr 18, 2012
Oamaru, New Zea...
1,810
06/12/12 10:31 PM (13 years ago)

zxing and QR codes

Hi everyone. I've successfully installed zxing as a library thanks to Daminan Flannery's blog here - http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/ Now I need to add a button to scan for a qr code to open a webpage. I'm using V2, and created two buttons, one to open junaio to scan for embedded AR, that all works fine, the second button is to scan for QR. Where to go from here?? The app needs a private QR scanner as we will be running a competition with prizes and the users will have to download the app after paying at the store so we do not want access to the QR codes with any QR code reader. I added the following to BT_act_controller.java public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0) { if (resultCode == RESULT_OK) { String contents = intent.getStringExtra("SCAN_RESULT"); String format = intent.getStringExtra("SCAN_RESULT_FORMAT"); showAlert("found!","Just found a url"); } else if (resultCode == RESULT_CANCELED) { showAlert("nothing found!","sorry nothing found here!"); } } } And further down ... //scan for QR code if(nextScreenType.equalsIgnoreCase("BT_scan_qr")){ Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult(intent, 0); } There was nothing added to the QR button when I downloaded the archive, so I changed the BT_config.txt to the following... {"itemId":"A6407A324DC8A7EE6F3A8E7", "itemType":"BT_screen_menuButtons", "itemNickname":"choosegame", "navBarTitleText":"choosegame", "childItems":[{"itemId":"4E23C1B55593CE2FBCD173D", "itemType":"BT_buttonItem", "loadScreenWithItemId":"53F9A255DA25BE11F59B3AB", "titleText":"Play AR", "imageNameSmallDevice":"buttonarsmall.png", "imageNameLargeDevice":"buttonarlarge.png"}, {"itemId":"AA55584B4023CA42249AB1C", "itemType":"BT_scan_qr", "titleText":"Play QR", "imageNameSmallDevice":"buttonqrsmall.png", "imageNameLargeDevice":"buttonqrlarge.png"}]} The result is still the "no screen is connected to this" error.... Am I barking up the wrong tree??? Have come a long way in two weeks but still have a hell of a journey ahead!
 
jawdoss
Android Fan
Profile
Posts: 359
Reg: Jun 10, 2012
Gold Coast, Que...
9,090
like
06/13/12 03:50 AM (13 years ago)
I can't figure out this either. I would like to put a QR reader into my android app, but have no idea how to. When you find out cold you please let me know how to do this? (message me please) If not, does anyone else know how I can make a page on my app with a QR reader???? Thanks
 
leona313
I hate code!
Profile
Posts: 1
Reg: May 29, 2014
ny
10
like
05/29/14 08:51 PM (11 years ago)
what do you mean by how to make a page on app with a qr code reader? http://www.keepautomation.com/products/net_barcode_reader/barcode_qrcode.html
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.