Integrating Open Camera with KoboToolbox

Is there a way to integrate Open Camera with KoboToolbox to include both tabular data and photos within the same entry? Given Android’s restrictions on third-party apps like Open Camera, this integration poses a challenge. Therefore, finding a solution to collect and manage high-quality, geotagged photos within a single survey platform is crucial. What are the possible approaches to achieve this? @ambassadors

2 Likes

@ahmadkhalid01, you should be able to do it as documented here. But at the moment it seems like our system needs some adjustment with these settings. I will update you once we fix this up.

Hi @ahmadkhalid01, I’m having trouble understanding all of your inquiry. Point by point:

Is there a way to integrate Open Camera with KoboToolbox

This I understand. “Image widget with custom camera app” is a newer feature added to the ODK specification (as Kalyan linked above), which KoboToolbox does not yet support.

…to include both tabular data and photos within the same entry?

What do you mean by this? You can certainly already include text, numbers, and any other question type alongside photos in the same submission.

Given Android’s restrictions on third-party apps like Open Camera, this integration poses a challenge.

Which restrictions? Are you envisioning that the integration approach already in the ODK spec, but not yet supported by KoboToolbox, will soon fail due to Android policies?

Therefore, finding a solution to collect and manage high-quality, geotagged photos within a single survey platform is crucial. What are the possible approaches to achieve this?

You can collect geopoints and photos in the same submission using KoboToolbox or any other ODK-compatible survey platform. Could you elaborate specifically on what it is that you are not yet able to achieve?

2 Likes

Hi Jnm,

I mean the geotag information within the photo itself captured by Open Camera as you can see in the attached photo. Currently, Android doesn’t allow Open Cemera App and other third apps to be selected as default. I hope this is clear now.

Thanks! I understand now. One thing I haven’t had time to investigate is the difference between “External app image widget” (ref), which is older, and “Image widget with custom camera app”, which we were discussing above and do not yet support.

In other words, I wonder: what would happen if you tried ex:net.sourceforge.opencamera in your appearance instead of app=net.sourceforge.opencamera? It should
“[launch] an external app and [receive] an image back from the external app. If the specified external app is not available, it is not possible to use the widget” (ibid).

1 Like

FYI, I confirmed the currently supported version of KoboCollect (v2024.1.3) itself does in fact support the relatively new image widget with custom camera app feature. [I was able to test this using KoboCollect against a form deployed to ODK Central]

However, what appears to currently be the issue is that probably the version of pyxform being used in Kobo doesnt recognize the new app parameter field that is used to specify which external app to use for the intent. Although you can successfully upload an XLSForm with it into Kobo, if you try to deploy it you’ll get an error popup

[scratch my earlier post about the XForm being identical; looks like I got my files crossed… I’ll verify if the appearance-based definition still fires off the external camera app correctly and post back]]

1 Like

So it appears that using an appearance-based appearance=ex:net.sourceforge.opencamera will successfully launch the external camera app (I installed Open Camera). However, after taking a picture it is not actually returned back to KoboCollect; you are simply left in the Open Camera app…

Whereas, the newer intent-based app=net.sourceforge.opencamera both launches the app and after you take a pic it immediately returns back to KoboCollect with the image, as desired.

So I think the solution is probably for us to update pyxform in Kobo so that you can successfully deploy an XLSForm with the new app-based approach; KoboCollect itself is already setup to support it.

2 Likes

@Xiphware @jnm @Xiphware I tried the methods you mentioned but with no success. External apps (specifically photo and audio apps) work without these intent appearance expressions in Android 10 or lower, but they do not work in higher versions above 10.

1 Like

Seria bueno que se actualizara para poder cargar fotos desde apps externas @Kal_Lam

Any news on this subject? We are really interested in it!

Kobo expects to be updating our pyxform version probably next month, at which point it’ll pick this new app=my.custom.camera feature up.

Great, I’m looking forward to using this new feature.