Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

Table of Contents
minLevel1
maxLevel23
outlinefalse
stylenone
typelist
printabletrue

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.”

...

Using Multimedia Capture Questions

...

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

CommCare doesn't have the capacity to record audio natively, so in order to capture audio in a CommCare application, users need to install a 3rd party audio-recording app from the Play StoreStarting 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 https://play.google.com/store/apps/details?id=dje073.android.audiorecorderlite for this 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:

...

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.  VGA

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.