Media Capture Questions

Screenshot 2024-04-26 at 8.27.45 PM.png

It is possible to capture Images, audio, and video on CommCare for Android devices. See Form Builder for details on how to add the appropriate type of question. 

Table of Contents:

Adding Media Capture Questions To Your Application

To add media capture questions to your application, in the Form Builder, simply select the question type “Media Capture.”

Screenshot 2024-04-26 at 8.40.10 PM.png

Using Multimedia Capture Questions

Image Capture

When you get to a screen with an image capture question you will have the option of either capturing the data in real time (i.e. opening a camera app to take a picture) or choosing a file from you phone (i.e. navigating to a folder on your device to find a specific file).

Widget Options: By default, users will be able to either record multimedia live, or will be able to choose an existing piece of multimedia to attach. In order to require that the multimedia be captured live, the Appearance Attribute for the question in the form builder can be set to acquire. This will remove the ability to select an existing file.

If you have selected the incorrect file to upload to the application, you can click the Clear button to clear the current selection. This is a default option for the multimedia question type, as displayed below:

Audio Capture

Starting CommCare 2.50, CommCare has an in-built audio widget as the primary audio capture widget.

In case you want to use an external audio-recording app, you can do so by using the legacy appearance attribute with the audio-capture question. We recommend RecForge Lite - Audio Recorder - Apps on Google Play as the third party app for audio-capture because it is known to work well with CommCare.

Downloading Captured Media Files

Accessing Individual Files

Capture media files are available from the Submit History report on the CommCareHQ Reports tab:

1. Go to the Reports tab and apply the filters to the Submit History Report

2. Find the form submission of interest and click on "open form"

3. Click on the tab that says "Attachments" and you will see a .jpg file that you can click on and download:

Downloading Captured Media Files in Bulk

You can also download all of the media files attached with a form from Form Data Export on CommCareHQ:

Any form with associated files will have a Download button accessible.

NOTE: Bulk multimedia exports support only up to 5 GB of data. Please see Form Data Export | Multimedia Exports for common errors encountered if your file size exceeds 5 GB.

Linking Media Files with Form Exports

For more information please on linking the files and naming conventions see Form Data Export.

Considerations for Using Multimedia Capture

Image Capture

Users should not capture very large files because these may cause form submission to become blocked in areas with poor connectivity. 

Anything greater than 1MB could cause issues including slow syncing and failure to upload the picture to CCHQ. BE SURE TO TEST THIS EXTENSIVELY IN LOW-CONNECTIVITY SETTINGS. The more rural/remote you get, the greater chance that submitting images will be an untenable workflow because the network is too bad. The best rule of thumb is to use a small (< 1MB) file size when taking pictures within CC.

You can set the file size in the settings for the Multimedia Capture question.

This will resize the image before sending the form.

  • Small - 0.1 megapixels

  • Medium - 0.2 megapixels

  • Large - 0.5 megapixels

VGA files seem to work particularly well.  You may have to manually adjust this in your camera app if you prefer to take larger size pictures outside of CommCare. If you are looking at a report in CCHQ and you either can't find an image you know you captured, or you see an image file name but it is not linked to anything, make sure that you did not take a very large image that could not be submitted over the network.

Audio Capture

Audio Focus and Best Practices for Recording Audio in CommCare

Android devices use a feature called Audio Focus to manage how apps share audio resources, such as recording and playback. This Android OS ensures that only one app has primary access to the audio capabilities at a time. When CommCare is recording audio, if another app takes control of the audio focus during the recording, this can result in blank or incomplete audio recordings.

To help users avoid this, CommCare includes notifications and alerts to inform you when the audio focus has shifted away from the app during a recording. If you receive such an alert, it is recommended to stop the recording and start again once you’ve resolved the issue causing the shift in focus by closing all other apps using the microphone.

 

Additionally, to minimize the chances of this happening, we recommend the following best practices:

  • Close Background Apps: Before starting a recording in CommCare, make sure to close all other apps running in the background. This will reduce the risk of another app taking over the audio focus while you’re recording.

  • Avoid Bluetooth Devices: Ensure that no Bluetooth devices (e.g., headsets or speakers) are connected during the recording. Bluetooth connections can interrupt audio focus and affect the quality of your recording.

  • Disable Google Assistant: To avoid interruptions, disable Google Assistant or any other voice-activated services on the device, as they may interfere with CommCare’s recording capabilities.

  • Do Not Navigate Away from CommCare: When using CommCare’s built-in recording feature, avoid navigating to other apps during the recording. Leaving the CommCare app while recording may interrupt the audio capture and result in blank recordings.

  • Limit Recording Duration: For recordings longer than 15-20 minutes, it is not recommended to use CommCare’s in-built audio recording widget. Instead, we recommend using a third-party app to record your audio, and then upload the recorded file into CommCare. More information is provided in the section above on how to activate this option.

    • Using third party apps comes with a caveat that users may upload or attach the incorrect audio file from storage. If this workflow is not an option for you, we recommend enabling Airplane Mode before starting any extended recording sessions, because receiving calls or notifications from other apps may disrupt the recording process, resulting in incomplete or silent audio.

  • Monitor Phone Storage and Memory: Ensure your phone has sufficient available memory and storage before starting a long recording session. If your phone runs low on memory, the operating system on some devices is known to forcefully close CommCare. This may lead to lost or incomplete audio files.