CommCare ODK and multi-media

I am currently targeting my CommCare application for both a Nokia 5130 and a
Nexus S. I managed to get images and audio working on the Nokia, but have
not been successful with Android so far. Here is a copy of the relevant
section of my Xform specification.

Edad en años jr://file/CommCareMedia/Images/patient_age_years.jpg jr://file/CommCareMedia/Audio/patient_age_years.mp3

On my Android, I copied the same folder (ie.CommCareMedia) to the root
folder; however, that did not appear to work (ie. I received a message
stating "The application ODK Collect ... has stopped unexpectedly. Please
try again." when I would have expected to see my image show up). So, I guess
I wonder if there is a different 'root folder' location on the Android. Any
guidance would be appreciated.

When searching the user group for information related to this, I noticed
that the ODK version of CommCare was (is?) not quite ready for prime time.
Is this still the case? (ie. should I avoid trying to use the Android
version in production).

Thanks, Ray

Ray,

Multimedia inside of CommCare ODK forms is run through the same mechanism as
the independent ODK app. Everything should work if you go ahead and locate
the media folder at

/mnt/sdcard/odk/CommCareMedia

Let me know if you have any problems once the files are moved to that
location.

-Clayton

··· On Tue, Oct 4, 2011 at 5:15 PM, Ray B wrote:

I am currently targeting my CommCare application for both a Nokia 5130 and
a Nexus S. I managed to get images and audio working on the Nokia, but have
not been successful with Android so far. Here is a copy of the relevant
section of my Xform specification.

Edad en años jr://file/CommCareMedia/Images/patient_age_years.jpg jr://file/CommCareMedia/Audio/patient_age_years.mp3

On my Android, I copied the same folder (ie.CommCareMedia) to the root
folder; however, that did not appear to work (ie. I received a message
stating "The application ODK Collect ... has stopped unexpectedly. Please
try again." when I would have expected to see my image show up). So, I guess
I wonder if there is a different 'root folder' location on the Android. Any
guidance would be appreciated.

When searching the user group for information related to this, I noticed
that the ODK version of CommCare was (is?) not quite ready for prime time.
Is this still the case? (ie. should I avoid trying to use the Android
version in production).

Thanks, Ray

Thanks Clayton. That did the trick. The images are now showing up fine;
however, the mp3's are not playing when I hit the speaker icon. Is there an
additional key or gesture that could be used to trigger the playback of the
audio clip?

Ray

PS. I see how appropriately sizing images for multiple devices can be
tricky. Image that look fine on the Nokia end up 'stretched' on the Android

Ray,

Strange regarding the mp3's. Pressing the button is definitely the trigger
for playing the clip. I've never had any mp3 playback problems, but could
imagine there being issues with different codecs, etc.

Have you tried playing the MP3's through the phone's normal file interface
to make sure that it's compatible with the device's configuration? If not,
you could try transcoding to a different mp3 format.

-Clayton

··· On Tue, Oct 4, 2011 at 5:42 PM, Ray B wrote:

Thanks Clayton. That did the trick. The images are now showing up fine;
however, the mp3's are not playing when I hit the speaker icon. Is there an
additional key or gesture that could be used to trigger the playback of the
audio clip?

Ray

PS. I see how appropriately sizing images for multiple devices can be
tricky. Image that look fine on the Nokia end up 'stretched' on the Android

OK, I have the mp3 working as expected now. The app works great. Thanks
for your help, Clayton. Ray

Ray,

Glad to hear it! Could you let us know what the problem and solution was so
that folks can learn from them in the future? (This list is cataloged in
google groups as a Knowledge Base for commcare users).

-Clayton

··· On Tue, Oct 4, 2011 at 7:19 PM, Ray B wrote:

OK, I have the mp3 working as expected now. The app works great. Thanks
for your help, Clayton. Ray

Ray wrote: "I have the mp3 working as expected now"
Clayton responded: "Could you let us know what the problem and solution was
so that folks can learn from them in the future?"

Yes, I'm happy, although slightly embarrassed, to share this information.

Root cause: handset volume turned way down

Solution: turn up the volume

I'll make an extra effort to not waste anyone's time on similar/trivial
problems.

:slight_smile:

No such thing as a problem not worth sharing :). We might actually be able
to detect the volume and notify if that's the reason things aren't playing
for folks in the future. Seems like it could be useful.

Cheers,
-Clayton

··· On Wed, Oct 5, 2011 at 3:56 PM, Ray B wrote:

Ray wrote: "I have the mp3 working as expected now"
Clayton responded: "Could you let us know what the problem and solution was
so that folks can learn from them in the future?"

Yes, I'm happy, although slightly embarrassed, to share this information.

Root cause: handset volume turned way down

Solution: turn up the volume

I'll make an extra effort to not waste anyone's time on similar/trivial
problems.

:slight_smile: