Use ODK Collect without any internet connection

1. What is the issue? Please be detailed.

I am trying to use ODK Collect. I do not have any internet connection nor will any of the devices I am using to collect data. I need to be able to have a fully offline data collection process. In the past I used geoodk, which had folders that I could add the xml forms to.

However, once I install the ODK collect apk on my tablet I have only two options when I open ODK collect - get survey from QR code or connect to server/use google drive. I cannot do any of these things because I don't have an internet connection. How do I add surveys to ODK collect when I have no internet connection. I apologize if I am missing something very obvious here...

2. What steps can we take to reproduce this issue?

3. What have you tried to fix the issue?

4. Upload any test forms or screenshots below.

Hello @Sara_Lowes,
I'm not sure if my answer qualifies as a solution. ODK collect also has folders on the hosting device to which you can add the XML files. But to get the XML files of a project for the first time, you need to have an internet connection to add the project using QR code or server information and copy the folder. First-time connection is essential so that submission URL, project hashes, and other meta information are properly configured. There is no other method that I can think of.

Hi @Sara_Lowes and @shashpal

you can use Collect offline.
See the alternative processes with adb and briefcase here :
https://docs.getodk.org/collect-connect/#other-options

"Xlsform online" will help you to get the xml definition of your form :

1 Like

Thanks @mathieubossaert for sharing the resources. As I conclude from the documentation, adb and briefcase can be used to set up forms and process the collected data without any interaction with ODK server. ODK server is not needed at all. This is great.

Hi Matthieu,

Thank you for the quick response. I already use XLSFormOffline and ODK Briefcase.

The issue I am having is with setting up ODK Collect while I do not have an internet connection. It sounds like I would've already had to have downloaded adb when I had a faster internet connection. Since I do not have adb downloaded, is there still a way to set up ODK Collect?

Best,
Sara

You need to get an ODK Collect APK installer then install after permitting installations from unknown sources on your gadget.

You can create a project offline. You have a few options: use the demo project, generate a configuration QR code without a server URL or fill in some random URL when configuring manually (https://foo.foo is fine, you just need a https:// prefix).

The fastest thing to do is tap "Demo project" on the bottom of the landing screen. If you're offline, you won't be able to pull the demo forms from the demo server but that doesn't matter: you now have a project that you can push forms into.

adb is a tool to push files between a computer and a device and yes, it does require connectivity to install. How did you previously push files to devices? You may be able to use that same strategy. Have you tried it? What happened? /sdcard/Android/data/org.odk.collect.android/files/projects/[somelonglistofnumbersorDEMO]/forms is the folder you'll need to put your form definitions into (documentation). adb can navigate to it and I believe some file manager apps can as well but I don't know of specific ones. It may depend on Android version.

You shouldn't need Briefcase for pushing form definitions though it can be helpful for managing submissions you pull off of a device while offline.

If you're going to be configuring multiple devices offline, you can use the QR code functionality. Once you've created a demo project, you can tap the D icon in the upper right and then the Settings button. I would recommend updating the Project display section to include information about your project. You may also want to do things like select which buttons are visible to users (Access control).

Then you can tap on Project management at the bottom of settings, Reconfigure with QR code, and tap on the QR Code tab to show the QR code for the current configuration. You can scan that into other devices to set up their projects with the same settings. Then you'll need to plug them into a computer and copy over the form definitions as you did with the first one.

2 Likes

If you have a Windows computer, you may want to try Minimal ADB and Fastboot which is a 1mb download. It's available on this page: https://devs-lab.com/download-minimal-adb-fastboot-tool.html Be careful -- the page and download site have a lot of banner ads that look like downloads. If you carefully find the correct download button, that is a verified download.

1 Like