Scanning QR codes (or bar codes) as input to a CommCare form

956 views
Skip to first unread message

Eric Stephan

unread,
Feb 16, 2015, 1:07:43 AM2/16/15
to commcar...@googlegroups.com

Hello folks --

I remember at the very first introduction to CommCare that I was given, you guys used a CommCare app to scan a QR code, as an input to a form. 

Now, a project is interested in a simple use where a field would simply allow the user to scan a QR code and convert it into text to be placed into the field.

I couldn't find anything about this on the confluence site (though I was amazed to see material about the reverse... having a commcare form generated a QR code on the screen to be scanned.)

If I wanted to simply scan a QR code (or hey, maybe a regular linear barcode) to input a number into a CommCare form, how would I do it?

thx
eric

Charles Flèche

unread,
Feb 16, 2015, 1:18:32 AM2/16/15
to commcar...@googlegroups.com

Hi Stefan,

 

You can add a Barcode field in your CommCare app. Take a look at the Advanced menu in the application builder.

 

You'll have to install a barcode reader on your smartphones. This one works well : https://play.google.com/store/apps/details?id=com.google.zxing.client.android

 

Regards,

--

Charles Flèche

mHealth Advisor

Télécoms Sans Frontières http://www.tsfi.org

Première Urgence - Aide Médicale Internationale http://www.pu-ami.org

 

Charles Flèche

unread,
Feb 16, 2015, 1:20:47 AM2/16/15
to commcar...@googlegroups.com

Wrong URL, this is the one you want to check : https://play.google.com/store/apps/details?id=com.google.zxing.client.android

 

The application is called ZXing.

Eric Stephan

unread,
Feb 16, 2015, 1:56:43 AM2/16/15
to commcar...@googlegroups.com, mhealth...@tsfi.org

OK, that is both embarrassing and hilarious that it was sitting right there as an option in the form builder. 

Maybe next time I'll look and try before I run to the forum :)   

Then again, always nice to get the human contact...

Thanks for your help.   Yep, the ZXing scanner is the one that's installed on my phones.

Thanks!
Eric

Vivien Ayun

unread,
Jul 7, 2015, 12:40:49 AM7/7/15
to commcar...@googlegroups.com, mhealth...@tsfi.org
Hi all,

I am wondering if CommCare barcode scanner is able to read QR code? I am working on this agricultural data collection process, in which we are still torn between implementing standard barcode (linear matrix) verses a data matrix (eg. QR code) where you can have a scratch on the code and it still reads. Your help is very much appreciated! Thank you!

Best,

Vivien

Eric Stephan

unread,
Jul 7, 2015, 1:07:19 AM7/7/15
to commcar...@googlegroups.com, mhealth...@tsfi.org

Hi there--

CommCare reads QR codes perfectly!  I have never used the linear kind with CommCare, only QR.  So much nicer because, regardless of the scratch issue, it can also be read from any angle ... you don't have to line it up along one horizontal line.
 
I'd recommend making sure that the android app called Barcode Scanner (by a company called Zxing) is installed, and you tell CommCare to use that app when it goes to scan a code.

In fact, if you work with CommCare for any length of time, you'll see that the app actually needs to use QR codes when it comes time to tell the phone which of your apps you want to install onto a phone.

Eric

Vivien Ayun

unread,
Jul 7, 2015, 1:58:12 AM7/7/15
to commcar...@googlegroups.com, mhealth...@tsfi.org
Hi Eric,

Thank you for your response, this is very helpful!

Another quick question: do we have to configure the setting in order for the app to use the barcode scanner app, or is it automatic if we already have the barcode app installed in the device? Thank you very much.

Vivien

Eric Stephan

unread,
Jul 7, 2015, 3:14:31 AM7/7/15
to commcar...@googlegroups.com, mhealth...@tsfi.org
If the scanner app is already present on the phone, then, the first time that you go to ask the CommCare app to scan something, it brings up a screen where you choose which scanner app you want to use in order to do the scan.   it will list all the scanner apps that it finds on your phone.  When you choose the one you want, you also click the button that says "Always" ... and therefore it won't ask you the next time, it will automatically choose that app.

The only small issue would happen if, in the past, on that phone, you had already been using a barcode scanner app (which wasn't able to do QR codes) on that phone with commcare before, and you had previous chosen that app as "always" ... if you had done that in the past, and you wanted to change to a different scanner app like the Zxing one, then you would have to go into settings in order to "forget the default" that you had chosen for scanner apps.   Not certain where that is but it's a common step. 

Eric

Vivien Ayun

unread,
Jul 7, 2015, 3:37:15 AM7/7/15
to commcar...@googlegroups.com, mhealth...@tsfi.org
Noted. Thank you for the explanation. This is really helpful!

Best Regards,

Vivien Ayun
Senior Analyst
PHONE + 62 811 395 0065   SKYPE vivien.ayun

KOPERNIK CONNECTS SIMPLE TECHNOLOGY WITH LAST MILE COMMUNITIES TO REDUCE POVERTY »KOPERNIK.NGO

--
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/yJt44vgNV2Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages