Closed GoogleCodeExporter closed 9 years ago
Hi,
Country: UK
Phone: HTC Wildfire
OS: Android 2.2
Carrier: T-Mobile
Issue: Voice Recorder only saves audio files in 'amr' format. Which ODK Collect
currently won't upload to server.
Kirby
NOTES
I've built two forms which capture images, videos and audio. In both
cases the image and video capture and upload work fine - but in both
cases the audio fails to appear on ODK Aggregate.
I've checked on my phone and the appropriate audio file is being saved
on the sdcard as
/sdcard/odk/instances/test002_2011...../voicexxxx.amr
However after upload the audio files never appear on ODK Agregate
(v0.9.4). I've checked the Xform file (copied below) and the entries
for images, video and audio all have the same structure.
------------- Partial extract -------------
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://
www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://
openrosa.org/javarosa">
<h:head>
<h:title>test002</h:title>
<model>
<instance>
<data id="build_test002_1299690563">
<Image/>
<Video/>
<Audio/>
</data>
</instance>
<itext>
<translation lang="eng">
<text id="/data/Image:label">
<value>Take Picture</value>
</text>
<text id="/data/Image:hint">
<value>Take picture showing sign clearly</value>
</text>
<text id="/data/Video:label">
<value>Take Video</value>
</text>
<text id="/data/Video:hint">
<value>Take a 360 degree video of location</value>
</text>
<text id="/data/Audio:label">
<value>Record Audio Note</value>
</text>
<text id="/data/Audio:hint">
<value>Add any additional points </value>
</text>
</translation>
</itext>
<bind nodeset="/data/Image" type="binary"/>
<bind nodeset="/data/Video" type="binary"/>
<bind nodeset="/data/Audio" type="binary"/>
</model>
</h:head>
<h:body>
<upload ref="/data/Image" mediatype="image/*">
<label ref="jr:itext('/data/Image:label')"/>
<hint ref="jr:itext('/data/Image:hint')"/>
</upload>
<upload ref="/data/Video" mediatype="video/*">
<label ref="jr:itext('/data/Video:label')"/>
<hint ref="jr:itext('/data/Video:hint')"/>
</upload>
<upload ref="/data/Audio" mediatype="audio/*">
<label ref="jr:itext('/data/Audio:label')"/>
<hint ref="jr:itext('/data/Audio:hint')"/>
</upload>
</h:body>
</h:html>
Original comment by kirby.ja...@gmail.com
on 10 Mar 2011 at 7:58
Original comment by carlhart...@gmail.com
on 7 Jun 2011 at 5:44
fixed in 1.1.7.
Original comment by carlhart...@gmail.com
on 10 Jun 2011 at 1:21
* HTC Wildfire
* Android 2.2.1
* UK
* T-mobile
* ODK Collect v1.1.7-RC1
* ODK Aggregate beta 1.0 rev. 3
I've now tried recording using Collect V1.1.7-RC1.
Using the above form - Collect launches 'Voice Recorder' correctly - I can
record some audio - but 9 times out of 10 I get
... saving to SD card
... ODK Collect has stopped unexpectedly ...
I can restart Collect and I find that the sound file is accessible.
However when I upload the data to Aggregate no data appears at all??
Original comment by kirby.ja...@gmail.com
on 8 Aug 2011 at 7:34
can you use a logger like https://market.android.com/details?id=org.jtb.alogcat
to attach the crash log?
Original comment by yanokwa
on 8 Aug 2011 at 7:44
Also does the XML submission file contain the name of the audio file?
Indicating that it is needed for the submission?
Original comment by wbrune...@gmail.com
on 8 Aug 2011 at 7:46
collect 1.1.5 doesn't attach the audio file to the form, also collect
v1.1.7-RC1 crashes, when you use "choose" option in v1.1.7 to browse to the
audio file it still doesn't upload .amr audio
Do u know where can I download the source code of collect v1.1.7-RC1? I
remember once I added MIME type of .amr and it was working in 1.1.5, perhaps I
could try to include that support here also, so at least with "choose" option
the audio perhaps could work.
} else if (f.getName().endsWith(".amr")) {
fb = new FileBody(f, "audio/amr");
entity.addPart(f.getName(), fb);
Log.i(t, "added audio file " + f.getName());
Original comment by letsgo.s...@gmail.com
on 22 Sep 2011 at 2:22
.amr has been added to 1.1.7, but obviously something is wrong if it's
crashing. Can you tell us which device and version of Android you are using?
Original comment by carlhart...@gmail.com
on 22 Sep 2011 at 3:45
Hi, Thanks for your response, I'm using both Samsung Galaxy S II and S Plus,
with Android version 2.3.3
Original comment by letsgo.s...@gmail.com
on 23 Sep 2011 at 11:25
Just checked in a fix for this and verified it works and uploads. I think the
issue was that Collect was expecting a uri of media:// to come back, but if
users were using a file chooser they were getting a uri of file://. I've
updated Collect so it should handle both equally well, now.
Original comment by carlhart...@gmail.com
on 27 Sep 2011 at 8:01
Original issue reported on code.google.com by
yanokwa
on 10 Mar 2011 at 7:24