Page 2 of 5

Audio Recorder

Posted: Wed Jul 16, 2014 12:24 pm
by Lim Samantha

There are no errors in the console i guess.
Can i know which code to put in the button event? Isit this code?

navigator.device.capture.captureAudio(
CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureAudioOptions options]
);


Audio Recorder

Posted: Fri Jul 18, 2014 10:57 am
by Evgene Karachevtsev

Hello Lim,

Could you try this way:

codefunction captureSuccess(mediaFiles) {
var i, len;
for (i = 0, len = mediaFiles&#46;length; i < len; i += 1) {
&#47;&#47;do something with mediaFiles
}
}

&#47;&#47; Called if something bad happens&#46;
&#47;&#47;
function captureError(error) {
var msg = 'An error occurred during capture: ' + error&#46;code;
navigator&#46;notification&#46;alert(msg, null, 'Uh oh!');
}

&#47;&#47; A button will call this function
&#47;&#47;
function captureAudio() {
&#47;&#47; Launch device audio recording application,
&#47;&#47; allowing user to capture up to 1 audio clips
navigator&#46;device&#46;capture&#46;captureAudio(captureSuccess, captureError, {limit: 1});
}/code
You may find more info here: http://cordova.apache.org/docs/en/3.3...


Audio Recorder

Posted: Mon Jul 21, 2014 2:08 am
by Lim Samantha

Hi, i added the codes in my button event.
When I run my application and wish to test it, i click on the 'record your voice'. but nothing happens. how do i know if it is recorded??
please assist. thanks

Image Image


Audio Recorder

Posted: Mon Jul 21, 2014 6:29 pm
by Evgene Karachevtsev

Hello Lim,

Please clarify, do you perform "Full example" as it is described here:
http://cordova.apache.org/docs/en/3.3... ?


Audio Recorder

Posted: Tue Jul 22, 2014 2:59 am
by Lim Samantha

hi yes. i followed the 'full example' as shown.

Image


Audio Recorder

Posted: Tue Jul 22, 2014 4:21 pm
by Evgene Karachevtsev

Lim,

You don't do anything with the files. There, where there is the comment in the code
pre&#47;&#47;do something with mediaFiles/pre
you should add code which will send the file to the database. You may read more here: https://getsatisfaction.com/apperyio/...


Audio Recorder

Posted: Thu Jul 24, 2014 4:24 am
by Lim Samantha

in my case, i would like to send audio files to the database.

what codes should i add? able to provide me?

thank you


Audio Recorder

Posted: Thu Jul 24, 2014 4:27 am
by Alena Prykhodko

Hello,

Please show us what you have tried.
Please read post Evgene suggested.


Audio Recorder

Posted: Thu Jul 24, 2014 7:25 am
by Lim Samantha

hi, i followed this tutorial: http://devcenter.appery.io/tutorials/... but still does not save into database. please assist me.
how do i record my voice without start and stop button?

anyway here are the steps i did:

Image

added the upload files codes here:
Image

and the success and error codes here:
Image


Audio Recorder

Posted: Thu Jul 24, 2014 3:47 pm
by Evgene Karachevtsev

Hello Lim,

Could you please try to send files this way: https://getsatisfaction.com/apperyio/...
Not through uploadMultipleFilesHelper