Mobile Data Collection using ODK Collect
Open Data Kit (ODK) is a suite of tools that allows data collection using mobile devices and data submission to an online server, even without an Internet connection or mobile carrier service at the time of data collection. This tutorial will show you how to upload forms and collect data in the field using the ODK Collect application on an Android mobile device. The next tutorial, Manage Your Data with ODK Aggregate, will show you how to store, manage and view your data using ODK Aggregate.
Created by developers at the University of Washington's Computer Science and Engineering department and members of Change, Open Data Kit is an open-source project available to all. Please visit the ODK website for more information, recent updates, more tutorials, and to contribute to the project.
In this exercise, we will use a sample form for practice. Download the Sample.xml form to follow along with the tutorial.
- No programming skills needed!
- If you don't already have forms to work with and ODK Aggregate set up, we recommend that you take the Getting Started with Mobile Data Collection using ODK tutorial. However, if you have been provided with forms already and have been given a web address for an ODK Aggregate instance, taking the previous tutorial is not required.
- You need an Android mobile device running Android OS of 1.6 or newer.
Let's Get Started!
1. Search for the "ODK Collect" application from Google Play. Install the latest
version to your mobile device. For more information about ODK Collect and its
requirements, visit ODK website or the
ODK Project Page.
2. In the previous tutorial, you learnt how to upload your forms to ODK Aggregate. Or, you may already have forms that have been uploaded to an instance of ODK Aggregate that you are using. Turn on your mobile device and tap the ODK Collect icon to open ODK Collect.
3. You will see the home screen, which lists five options: Fill Blank Form, Edit Saved Form, Send Finalised Form, Get Blank Form and Delete Saved Form.
4. You'll want to put some forms on your device. First, we'll get some forms from the ODK team's instance of ODK Aggregate. Select "Get Blank Form". Select a few forms, such as "Birds", to get an idea of what kinds of questions are supported with ODK Collect. Press "Get Selected" to download the forms to your device and view them. If you want to create your own forms or import existing forms to your mobile device, see Getting Started with Mobile Data Collection using ODK. In this tutorial, you will learn how to import forms that have already been created onto your mobile device.
In the previous tutorial, Getting Started with Mobile Data Collection using ODK, you learnt how to set up your custom ODK Aggregate instance. This is the online location where your forms and your form submissions are stored. Now, you need to make sure that your phone knows the address of your ODK Aggregate instance.
2. Select the button at the bottom of the phone that is not the Home icon, the Search icon or the Back arrow. This icon looks different on different models of phone. It is called the "Menu" button.
3. You will see the "Change Settings" appear. Select it.
4. Under Server, you will see the URL of the ODK Aggregate instance to which your phone is connected. If this address has never been changed, the default is "https://opendatakit.appspot.com".
5. Click on "Server" to change the server address to
"https://odk-tutorial.appspot.com". Type in the new address. Now, any forms or data
submissions you send will go to our demo server. Make sure you don't send private data
to this server.
If you already have an ODK Aggregate URL, you can enter that URL in the Server settings and you'll be able to access and use any forms that have been uploaded to that server.
6. Once you have entered in the name of the new server, hit the device's Back button to
go back to the main menu. Confirm that you are accessing the new server by following
the instructions in the next step.
You can either download forms directly onto your device's SD card by plugging your phone into your computer and transferring them manually by dragging the files over to the device folder, or by accessing ODK Aggregate remotely and downloading the form files onto your phone over the Internet.
First, we'll cover downloading a form stored on your ODK Aggregate server. You must have an Internet connection to proceed.
1. Turn on your phone and open ODK Collect.
2. Select "Get Blank Form".
3. You will be able to choose from any form that is on your instance of ODK Aggregate. Toggle any forms that you want on your device's SD card for offline access, and download them. Select "Sample" to download the sample form for this tutorial, or select your own forms.
Importing Forms from your Computer to your Mobile Device
You can import a form onto your mobile device manually. The form must be an XML xforms like these sample forms.
- Connect your mobile device to your computer. Android versions offer different ways for you to mount your device onto your computer so that you can add and remove files. Walk through the steps that appear on your mobile device.
- Open the folder to your mobile device in Windows Explorer (PC) or Finder (Mac).
- Open the folder called "odk".
- Open the folder called "forms". Drag the form you just created into the "forms" folder.
- Disconnect your mobile device from your computer. If you're using a Mac, be sure to eject the device from Finder before unmounting your phone.
- Now when you open ODK on your phone, you will be able to enter data into your form.
Collecting Data in the Field with your Mobile Device
Now that you have the right forms on your device, you're ready to start collecting data in the field. Before you travel long distances to get to your field location, test your form to make sure that everything works. Remember to charge your device's batteries. Turn off settings that you won't need, such as the wi-fi settings, to prolong battery life.
1. Open the ODK Collect application on your Android phone.
2. Select "Fill Blank Form". Select the form you want to use, in this case "Sample".
3. Enter data into the form, swiping from right-to-left with your finger to get to the
next questions. Enter data in all required fields.
* Note: If you are using the "Sample" form for this tutorial, instead of a form you have uploaded to your own instance in the previous tutorial, any data you enter into the "Sample" form will become public and viewable to other tutorial users after you send it to ODK Aggregate in the next step. Avoid taking pictures of people and data that you want to remain private. If you want to learn more about privacy settings when you set up your own ODK Aggregate instance, learn more in the next tutorial.
4. When you're finished, make sure that the "Mark form as finalized" checkbox remains
checked, and hit the "Save Form and Exit" button. If the "Mark Form as finalized"
checkbox is unchecked, you will be able to go back later and edit the information in
the form, opting to save it as finalized later.
Review Saved Data
1. On the ODK Collect Home screen, you can review the data you collected, whether it's
been saved as incomplete or saved as complete. Select "Edit Saved Form" and choose the
data submission you'd like to review. You can correct any mistakes or update the
submission, opting to save your changes or ignore any changes made.
2. If you would like to edit form submissions, you can do so regardless of whether you selected "Mark as finalized" when you finished entering data. Tap the fields you wish to edit to get back to the form entry. Once finished, hit the back button on your device and save or ignore your changes.
Send Finalised Form
Once you've finished entering and reviewing data in the field, you're ready to send it to ODK Aggregate so that you can access it online later. You must have an Internet connection to proceed with this step.
1. Make sure that your device is accessing the Internet, either via a Wi-Fi connection or a data plan on a mobile service.
2. Open ODK Collect and select "Send Finalised Form".
3. Tick the box next to the entries that you wish to send. Those are the data submissions you entered in the field. The green tick mark denotes selected files to be sent. You can select them individually or Toggle All.
4. Press "Send Selected". Your files will be sent over the network to your ODK Aggregate server instance, in this case, https://odk-tutorial.appspot.com. You will see a message on your mobile device saying that your data was sent successfully (or not, depending on your Internet connection). Remember not to send data you don't want to share with the public if you are sending to this sample server.
5. To confirm that your data has been submitted successfully, visit http://odk-tutorial.appspot.com, find the Sample Form and click "View Submissions". Your submission(s) should appear in that list.
Congratulations - you have completed the basics of collecting data in the field using ODK Collect!
Discussion & Feedback
Have questions about this tutorial? Want to give us some feedback? Visit the Google Earth Outreach Discussion Group to discuss it with others.