kobocollect and External Apps

I would like to deploy a survey which connects to an external android application. This is possible using odk (https://opendatakit.org/help/form-design/external-apps/), however, I am having a hard time figuring out whether it is possible within the kobotoolbox framework.

I have tried uploading the example xml file from (https://github.com/opendatakit/breathcounter) to kobotoolbox.org, but receive an xml parsing error. I also tried importing an xml file generated using an xls file using http://opendatakit.org/xiframe/ . The xls file uploads fine, but the xml receives an error.

So, it appears that direct editing of the xml (required for linking to an external app), has very limited support (as is mentioned in the failed import message). Are there any solutions available or work arounds that we can use?

Thanks,

Ian

note: I posted this to the web support page, but think this is probably the better venue.

Hi Ian,

Imports from XML (which will convert them to the XLSForm format) are still experimental and not recommended as a form authoring method as they will always strip out some details. Instead I recommend creating your form in the formbuilder or in the XLSForm format, then deploy it to start collecting data. There’s no need to use the ODK website as KoBoToolbox uses the same method to convert XLSForms syntax.

If you want to make edits to the XML file (e.g. to do what you’re describing), just download the file after the form has been deployed, then copy the edited XML file to your Android handsets. They are stored on the internal storage at /odk/instance/[form-id]/

Best,

Tino

···

On Wed, Jul 13, 2016 at 4:02 PM, Ian Fellows ifel...@gmail.com wrote:

I would like to deploy a survey which connects to an external android application. This is possible using odk (https://opendatakit.org/help/form-design/external-apps/), however, I am having a hard time figuring out whether it is possible within the kobotoolbox framework.

I have tried uploading the example xml file from (https://github.com/opendatakit/breathcounter) to kobotoolbox.org, but receive an xml parsing error. I also tried importing an xml file generated using an xls file using http://opendatakit.org/xiframe/ . The xls file uploads fine, but the xml receives an error.

So, it appears that direct editing of the xml (required for linking to an external app), has very limited support (as is mentioned in the failed import message). Are there any solutions available or work arounds that we can use?

Thanks,

Ian

note: I posted this to the web support page, but think this is probably the better venue.

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Tino,

Thank you for the feedback. It sounds like you are saying that I could create a blank form, deploy it and then replace the downloaded xml file with my xml file on each device. From then on, the device will use the altered xml in place of the one downloaded from kc.kobotoolbox.org. Is that correct? If I do that will there be any issues with server syching as the local form will not match the one on the server?

Forgive the query, but I’m new to ODK and KoBo, but I don’t see the downloaded xml files that I am supposed to replace. my /sdcard/odk folder contains three folders: “forms", “instances" and “metadata". The instances folder appears to only contain an xml file for a partially completed survey that I was testing out. It does not appear to be an xform document.

The “forms" folder contains folders for each of the forms that I have deployed from the server. however, all of them are empty with no xml files.

Thoughts or guidance?

Thanks,

Ian

···

On Jul 13, 2016, at 1:10 PM, Tino Kreutzer tino.k...@kobotoolbox.org wrote:

/odk/instance/

Hi Ian,

Yes, that’s the correct procedure. The path for the form file to be replaced is in fact /odk/forms/[form-ID].xml. The different sub folders are empty unless your form had some media or csv file attached to it.

There will be no issue synchronizing the data back to the server as long as you don’t alter the structure of the form (adding or renaming a question or response option, changing the question type).

Best,

Tino

···

On Wed, Jul 13, 2016 at 4:41 PM Ian Fellows ifel...@gmail.com wrote:

Tino,

Thank you for the feedback. It sounds like you are saying that I could create a blank form, deploy it and then replace the downloaded xml file with my xml file on each device. From then on, the device will use the altered xml in place of the one downloaded from kc.kobotoolbox.org. Is that correct? If I do that will there be any issues with server syching as the local form will not match the one on the server?

Forgive the query, but I’m new to ODK and KoBo, but I don’t see the downloaded xml files that I am supposed to replace. my /sdcard/odk folder contains three folders: “forms", “instances" and “metadata". The instances folder appears to only contain an xml file for a partially completed survey that I was testing out. It does not appear to be an xform document.

The “forms" folder contains folders for each of the forms that I have deployed from the server. however, all of them are empty with no xml files.

Thoughts or guidance?

Thanks,

Ian

On Jul 13, 2016, at 1:10 PM, Tino Kreutzer tino.k...@kobotoolbox.org wrote:

/odk/instance/

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Tino,

Thank you. That is enough to get me on my way.

One last thought. My use case involves the external app generating a series of numbers and letters which then need to make their way into a text box in the survey. Right now users have to switch apps, write down with pen and paper the letters and numbers, and then switch back to kobocollect to type them in. One solution would be to integrate the external app, which as discussed, is a bit of a hacky enterprise. Another option would be to remove the need to write down the code and allow users to copy paste between the apps.

Now, because the FormEntryActivity class overrides the contextual menu, it is not actually possible to paste into kobocollect. In principle it seems like a useful feature to add. Would you be open to including a paste item in the contextual menu? I could try working up a pull request if you would find that useful.

Is https://github.com/kobotoolbox/collect the right repo? It says it is not maintained.

Best,

Ian

···

On Jul 13, 2016, at 2:00 PM, Tino Kreutzer tino.k...@kobotoolbox.org wrote:

Hi Ian,

Yes, that’s the correct procedure. The path for the form file to be replaced is in fact /odk/forms/[form-ID].xml. The different sub folders are empty unless your form had some media or csv file attached to it.

There will be no issue synchronizing the data back to the server as long as you don’t alter the structure of the form (adding or renaming a question or response option, changing the question type).

Best,

Tino

On Wed, Jul 13, 2016 at 4:41 PM Ian Fellows ifel...@gmail.com wrote:

Tino,

Thank you for the feedback. It sounds like you are saying that I could create a blank form, deploy it and then replace the downloaded xml file with my xml file on each device. From then on, the device will use the altered xml in place of the one downloaded from kc.kobotoolbox.org. Is that correct? If I do that will there be any issues with server syching as the local form will not match the one on the server?

Forgive the query, but I’m new to ODK and KoBo, but I don’t see the downloaded xml files that I am supposed to replace. my /sdcard/odk folder contains three folders: “forms", “instances" and “metadata". The instances folder appears to only contain an xml file for a partially completed survey that I was testing out. It does not appear to be an xform document.

The “forms" folder contains folders for each of the forms that I have deployed from the server. however, all of them are empty with no xml files.

Thoughts or guidance?

Thanks,

Ian

On Jul 13, 2016, at 1:10 PM, Tino Kreutzer tino.k...@kobotoolbox.org wrote:

/odk/instance/

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “Kobo Users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/kobo-users/hdRabXoOJw4/unsubscribe.

To unsubscribe from this group and all its topics, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Hi Ian,
You can paste text into KoBoCollect, you just have to 1) enter text 2) tap the text 3) tap the cursor. It’s enough to type in a space character and then replace it with your pasted text. You could also add a default text (“Paste-Here”) that your enumerators need to replace with the pasted numbers, then add a validation rule that prevents ‘Paste-Here’ as a valid response to avoid skipping the question.

I’ve updated the readme text on the Github repo.

Tino

···

On Wed, Jul 13, 2016 at 5:20 PM Ian Fellows ifel...@gmail.com wrote:

Tino,

Thank you. That is enough to get me on my way.

One last thought. My use case involves the external app generating a series of numbers and letters which then need to make their way into a text box in the survey. Right now users have to switch apps, write down with pen and paper the letters and numbers, and then switch back to kobocollect to type them in. One solution would be to integrate the external app, which as discussed, is a bit of a hacky enterprise. Another option would be to remove the need to write down the code and allow users to copy paste between the apps.

Now, because the FormEntryActivity class overrides the contextual menu, it is not actually possible to paste into kobocollect. In principle it seems like a useful feature to add. Would you be open to including a paste item in the contextual menu? I could try working up a pull request if you would find that useful.

Is https://github.com/kobotoolbox/collect the right repo? It says it is not maintained.

Best,

Ian

On Jul 13, 2016, at 2:00 PM, Tino Kreutzer tino.k...@kobotoolbox.org wrote:

Hi Ian,

Yes, that’s the correct procedure. The path for the form file to be replaced is in fact /odk/forms/[form-ID].xml. The different sub folders are empty unless your form had some media or csv file attached to it.

There will be no issue synchronizing the data back to the server as long as you don’t alter the structure of the form (adding or renaming a question or response option, changing the question type).

Best,

Tino

On Wed, Jul 13, 2016 at 4:41 PM Ian Fellows ifel...@gmail.com wrote:

Tino,

Thank you for the feedback. It sounds like you are saying that I could create a blank form, deploy it and then replace the downloaded xml file with my xml file on each device. From then on, the device will use the altered xml in place of the one downloaded from kc.kobotoolbox.org. Is that correct? If I do that will there be any issues with server syching as the local form will not match the one on the server?

Forgive the query, but I’m new to ODK and KoBo, but I don’t see the downloaded xml files that I am supposed to replace. my /sdcard/odk folder contains three folders: “forms", “instances" and “metadata". The instances folder appears to only contain an xml file for a partially completed survey that I was testing out. It does not appear to be an xform document.

The “forms" folder contains folders for each of the forms that I have deployed from the server. however, all of them are empty with no xml files.

Thoughts or guidance?

Thanks,

Ian

On Jul 13, 2016, at 1:10 PM, Tino Kreutzer tino.k...@kobotoolbox.org wrote:

/odk/instance/

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “Kobo Users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/kobo-users/hdRabXoOJw4/unsubscribe.

To unsubscribe from this group and all its topics, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.