This is less of a support issue and more of a query of what's possible with the current ODK (1.x) suite. I have a usage scenario that requires launching an external application to collect a real-world measurement. I want it to be incorporated into the form so it attached and submitted when uploading the form.
I have used the external app functionality, but if I remember correctly, it is limited to numbers and strings as output. Does anyone know if it's currently possible to create an attachment using external app data or do I need to extend the Collect application to do this?
I really appreciate any help you can offer.
You are remembering correctly, @Batkinson, there exist question types to get external text and numeric values but not arbitrary files. For those who don't know this functionality, it is documented at http://docs.opendatakit.org/collect-integrations/#launching-external-apps-to-populate-single-fields. It's also possible to populate several fields at once: http://docs.opendatakit.org/collect-integrations/#launching-external-apps-to-populate-multiple-fields
I believe that if you are developing the external app yourself you could write the file directly to the appropriate instance folder. This is certainly not elegant but might be a quick and dirty way to get what you need.
If you wanted to capture an image or video you could configure the devices to use your app or show an application picker when Collect shows image or video questions. I'm guessing you've already considered that and that your file is of a different type. What is its type?
At this point I am just doing information discovery so this is a bit of a moving target. The files are extracted fingerprint templates in ISO/IEC 19794-2 format. Basically, I am trying to support biometric enrollment, using fingerprints, through what is already supported in ODK Collect and the Aggregate protocol, if possible. If there are missing pieces required to make it work, I am interested in contributing the extensions necessary to make it work back to the project.
My thoughts based on what you suggested is that I should maybe look at trying to extend the external app support to support attachments in a general way or, if not directly possible, whatever is next on the path.
That's great, @Batkinson. There has been long-standing interest in fingerprint biometrics and it would be great to find a reasonable way to support it.
A question type that gets a file from an external app seems generally useful and should be pretty straightforward to implement.
Am I assuming correctly that you have an existing external app that interfaces with whatever fingerprint reader you're using (internal or external), lets the user capture a print and gives you the data file corresponding to that print? It sounds like you are thinking of sending the raw print data to the server and doing the matching there?
I know there are some prototype implementations floating around to support the hardware from Simprints. Everything I know about that is in the conversation at https://github.com/XLSForm/pyxform/issues/137#issuecomment-315836370. From what I understand the Simprints strategy is to keep the prints to ID mapping in the external Simprints app and to return an ID to Collect.
Thanks for the additional information @LN. I wasn't aware of that project until you mentioned it and not surprisingly, that strategy is actually one of the ones I was considering. One key challenge we're facing is the mode of identification we're considering (100% offline) and the scale of the biometric database (probably close to 300,000). Using just the straight biometric matching algorithm, it's unlikely to work on a mobile device at point of service. Consequently, I was considering the possibility of using heuristics to reduce the biometric search space. Unfortunately, treating biometric identification as a black box eliminates that as a possibility, but it has many advantages as well.
Anyway, I appreciate the thoughtful response.
Oh, sorry I didn't answer your question. Your assumption was correct. Essentially, I have a fork of OpenANDID and a Lumidigm Mercury M301 scanner. The combination works to capture the fingerprint templates in the standard formats. I'll likely be developing the functionality to have it integrate with Collect no matter what, but whether we will try to use it in the end will be based on further considerations.
@shawn.sarwar, have you done/seen OpenANDID integrations with Collect? (Shawn is the creator of OpenANDID)
Hi @LN & @Batkinson,
OpenANDID, wow. I had no idea anyone had come across it! It should work out of the box with Collect as the intent structure was designed to work with CommCareODK of 2-4 years ago. My apologies up front if you go that route, it's not actively maintained and not well documented.
My top three pieces of advice:
The scanning of the fingerprint is the most important part of the process. While the ANDID/Lumidigm integration works, Android isn't kind to users of USB Host. More often than you like, you'll need to reconnect fingerprint scanners. The USB OTG adapters are also generally of low quality, so you'll want to have extras; without extras you won't be able to distinguish between a faulty cable and a fault scanner. All that to say, if you can use Simprints wireless scanner, do yourself a favor and do so. If not for a better user experience, then just so that you have some paid support.
You're definitely right about limiting the search domain. Do it by all reasonable measures.
Don't present matches as authoritative if you can help it. In a large enough cohort with real users inputting data, there's always going to be a point at which you have a false match or false non match. If you always present the top scorer with no context, there's then no way for your user to override that error. Give context, particularly when there's not a clear best match or when the highest scores are just sub threshold. Have your user verify any match with some other information. It'll be right almost all of the time, but depending on the reason you're identifying people the one time the match is wrong might be the most important.
If you have specific questions I'd be happy to help; about OpenANDID or more generally about fingerprint biometrics on mobile devices. It's not the focus of my work anymore but it was for a long time.
Hi Shawn, I really appreciate your work and thank you for providing the relevant information. I inferred a lot about the state of the project immediately after attempting to build it and you summed up what my assessment was. You also identified the key reason I still forged ahead when you said this:
Essentially, that the project included a freely available user-mode driver for a multispectal biometric scanner meant for the price of a scanner you can capture fingerprint templates with open source software. It was worth me putting in some effort to understand the rest of the project just for that. After taking a good swipe through the project, I wasn't sure what else would be usable for our purposes as-is, but in my opinion it was good enough to prototype something.
Your other points are well-taken and they confirm my sense after doing a good amount of investigation into how to make this work at a reasonably large scale. Our existing application is already providing lucene-based fuzzy searching of the entire population and I was considering trying to integrate biometric identification/verification to work together with that scheme.
Lastly, I appreciate your offer to field questions. Beware, I will likely take you up on it!
Thanks! (to both of you)