Bar Code

Discussions about creating CAPI applications to run on Android devices
Posts: 14
Joined: September 22nd, 2016, 9:24 am

Bar Code

Postby ABOUBALLACK » December 14th, 2018, 4:16 am

I would like to know if it is possible to scan the barcode of a card and retrieve all information at the same time behind. If yes, how?

Posts: 1866
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bar Code

Postby josh » December 15th, 2018, 9:45 am

We don't have direct support for barcode scanning in CSPro.

On Windows, many handheld barcode scanners work as if they are keyboards. They connect to the PC via USB and when you scan a barcode they simulate typing the barcode. These kinds of scanners will work well with CSPro.

On Android there are many barcode scanning apps you can find for free on Google Play however they do not integrate directly with CSPro so you would have to switch to the barcode app, scan the barcode, copy the result, switch back to CSPro and then paste the scanned barcode.

Posts: 382
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: Bar Code

Postby htuser » December 15th, 2018, 11:23 am

Thank You Josh for your complete explanation.
Since there's lot of open source program for barcode scanning/reading ( ... -libraries), we'll be very happy to see embedded barcode scanner in Cspro in the future.
Now, also, some barcode scanner store reading results in sqlite database on Android/Windows. So, Cspro's sqlquery can be used to read them, exept, in his actual fashion, sqlquery can't open sqlite database using credentials... However, to open external sqlite databse from other application, this is required. Hopefully this can be in the future according to my discussions with Greg.

Best Regards,

Posts: 14
Joined: September 22nd, 2016, 9:24 am

Re: Bar Code

Postby ABOUBALLACK » December 17th, 2018, 8:57 am

Thank you
It will be a good project because more information will be retrieved at once and in no time as some data collection applications do.

Last question about forms

how can I avoid entering the questionnaire number? I would like this to be done automatically once set Protected

Posts: 150
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Bar Code

Postby aaronw » December 27th, 2018, 4:31 pm

I believe you're asking how to pre-fill the id item.

If you have a single interviewer you could simply tick the id item's properties auto increment and protected. If you have multiple interviewers you'll need to maintain the uniqueness of the case id by adding an interview id (for example). However, this puts you back where you started.

To move past this you need to save the operator id, so they don't need to enter it every time. Here's a couple ways to approach this.

Quick and dirty approach:
If each interviewer has their own tablet set the device name and then use that as the pre-fill. Alternatively, you could include a text document with the operator id. Then use fileread to read it and prefill it.

Menu application:
This would require more work. You'd create a separate application that asks the interviewer for their operator id. Savesetting and loadsetting would then be used to make it persistent, so the interviewer doesn't have to enter it each time. The menu application then launches your data entry application and pre-fills the operator id.

Return to “Android”