Add media files directly to your ODK Collect folder to use in forms
In cases where mobile data or WiFi connection is limited, downloading large media files from your Ona account to ODK Collect may be challenging. In this case, you can manually add media files to your device(s) instead of uploading form media files into Ona.
Below are step by step instructions on how to add media files to your /odk/forms directory on your device’s storage:
- Connect your device to your computer using a USB cable, double click on the /sdcard/odk/ directory;
- Within that directory, locate the media subdirectory associated with your form, in our case we’ll double click on Birds-media;
- Drag and drop all of your media files into that media subdirectory;
Note: For For Android 10.x (and later) devices, the directory can be found will be /sdcard/Android/data/org.odk.collect.android/files
Author an XLSForm that captures or records media
Adding a question for capturing photos
It is possible to introduce questions that will launch the smartphone device’s camera during data collection. This tutorial XLSForm illustrates how to include questions that allows one to capture an image. In your XLSForm, the question type for such a question should be image. In ODK Collect, the image capture relies on the configuration and capabilities of your device’s camera application.
You either launch the camera by tapping on Take Picture button or select an image stored in your device’s storage by tapping on the Choose Image button.
When collecting data via Enketo the camera cannot be launched, but the image will be uploaded from your local drive.
Adding a question to record audio or video
Yes, it is possible to introduce questions that will launch device’s audio or video recorder during data collection. For example, to collect an audio or video recording.
For example, you would write your questions as follows in your XLSForm:
|audio||audio_recording||Take an audio recording|
|video||video_recording||Take a video recording|
When collecting data using ODK Collect on your device you can either tap on Record Sound or Record Video button. You can also select a recorded audio or video file from your device by tapping on Choose Sound for audio or Choose Video for video.
Audio capture relies on the configuration and capabilities of the device’s audio recorder app. On newer 4.x devices and tablets, the inbuilt audio recorder app may not provide a good user experience when launched from ODK Collect. To get audio capture to work on devices that do not come with a built-in audio recorder, installing RecForge Lite which is a free third party app and may also provide a better experience.
Viewing media files captured during data collection
On the Project page, select the form that you wish to view the media data captured then follow the instructions below:
- Navigate to the form’s Table tab, scroll from left to right on the data table to locate the media file question;
- Double click on a row, from the single submission view you’ll be able to see the media file (i.e. image, video or audio). You can also click on the media file name to view or download a specific file;
- You can also view images on the Photos tab. The Photos tab lets you view all the images from your form in a slideshow format. Read this guide for more information.